China prides itself on its public security but a mass killing and string of violent attacks have triggered online discussions about the nation's mental health.