Students’ intentions to practice primary care are associated with their motives to become doctors: a longitudinal study