Hungarian politicians have passed new legislation which bans Pride events and introduces hefty fines for anyone at a prohibited event.