BEIJING — Richer and more assertive since the last American presidential campaign, China is looking at the harsh anti-Chinese sentiment being expressed by both candidates with a mixture of aloofness and unease.