More than 1,000 protesters gathered hours after the vote outside Hungary’s parliament in opposition to the measures.