Photonic spin-orbit coupling in optical microcavities