Linear stability of shear profiles and relation to the secondary instability of the Dean flow