Shocks in unmagnetized plasma with a shear flow: Stability and magnetic field generation