The results of the general election pushed the Conservatives just far enough over the line to form a majority government, but in many seats the race was neck and neck until the end.