Republicans have seized control of the US Senate after flipping Democratic-held seats, wresting away the majority for the first time in four years.