Republicans survived a scare in Kansas’s Fourth Congressional District on Tuesday night, winning a deeply conservative district that was starting to look like it might slip into Democratic control at the last minute.