The 2D Boussinesq equations with vertical dissipation and linear stability of shear flows