Polarization rotation in multipass optical cavities