Home Office faces court challenge over allowing asylum seekers to be interrogated by countries from which they are trying to flee