Britain's construction industry suffered its worst contraction in seven years ahead of the Brexit vote.