Republicans took a critical step toward notching their first significant legislative victory since assuming full political control, as the House and Senate voted along party lines on Tuesday and into early Wednesday to pass the most sweeping rewrite of the tax code in decades.