Regulator Ofcom said that it would ban mobile phone carriers and broadband providers from linking prices to high inflation figures in the middle of a customer’s contract.