Lifetime spirometry patterns of obstruction and restriction, and their risk factors and outcomes: a prospective cohort study