EU completes reform of migration rules despite Poland and Hungary voting against