A Chinese court has sentenced a man to death for the fatal stabbing of a 10-year-old Japanese schoolboy marking one of several recent high-profile cases of violent attacks on foreigners in China.