In recent weeks, a morbid-sounding app has taken China by storm, tapping into widespread loneliness and youth disaffection in the world’s second most populous country.