The UK economy unexpectedly contracted by 0.4% between July and September, according to official figures, meaning the country is still in recession.