Magnetic braking, ambipolar diffusion, and the formation of cloud cores and protostars. 1: Axisymmetric solutions | Synapse