The Conservatives have secured a resounding win in the Hartlepool by-election in County Durham, taking the seat off Labour for the first time since it was created in 1974.