Poland’s nationalist government won a vote of confidence in parliament on Thursday which it called to shore up its authority before a presidential election.