UK inflation fell sharply in October to its lowest rate in two years, largely due to lower energy prices.