The UK’s economy contracted by 0.1% in the second quarter, according to official estimates.