An appeals court has reversed a ruling that declared Houston firefighters’ pay-parity measure unconstitutional, a major win for the fire union and one that could have far-reaching effects on city finances.