A general decoding strategy explains the relationship between behavior and correlated variability