Queensland became Australia’s first mainland state to elect a center-right government in more than 18 months, breaking the Labor Party’s hold on power ahead of a national election due by May.