Time trends in prescribing of type 2 diabetes drugs, glycemic response and risk factors: a retrospective analysis of primary care data, 2010-2017