Labour have retained the Hartlepool Borough Council seat previously held by the town's new MP following a by-election.