how many years to become a midwife