Isotropic and Anisotropic Bouncing Cosmologies in Palatini Gravity