Winning the House majority, even with a smaller margin than they’d hoped, will give Republicans some newfound power to set the agenda when they take over the chamber in January.