Japanese Prime Minister Shinzo Abe, after years of skirmishing with China over territory and security, is now promoting a rapprochement with Beijing that reflects Tokyo’s need for allies in upholding the postwar free-trading system amid President Donald Trump’s tough line on trade.