The European Union's top court has ruled that refugees must continue to seek asylum in the first European country they reach, even in exceptional circumstances like the migrant crisis of 2015.