The UK economy faces a major transition as unemployment ticks up and the ageing population weighs on the public purse.