A model of parity-dependent immunity to placental malaria