Time-varying and dose-dependent effect of long-term statin use on risk of type 2 diabetes: a retrospective cohort study