Japan border policy keeps thousands of foreigners in limbo