Xi's China has cranked up nationalism and flexed muscles but no longer projects unbridled confidence as global leadership slips from reach.