The class of lawmakers taking office is noticeably more male and less diverse than the constituents it will represent.