The effect of mode of delivery and duration of labour on subsequent pregnancy outcomes: a retrospective cohort study