SYDNEY—The United States commissioned a warship in Sydney, Australia, on Saturday—the first time a U.S. Navy vessel joined active service at a foreign port—as the two close allies step up their military ties in response to China’s expanding regional reach. The Independence-class littoral combat ship—named after a Royal Australian Navy cruiser that was sunk while…