Japan detains five foreigners in al-Qaeda probe