The European parliament has voted for the first time ever to issue sanctions against Hungary over breaching democratic values.