China vows to ‘protect safety of foreigners’ amid Japan row