Stable and unstable shear modes of rotating parallel flows in shallow water