Prime Minister Mark Carney, constrained by leading a minority government for the past year, gained a majority in the House of Commons after special elections on Monday.