The defense ministers of South Korea and China have agreed to develop their security ties to ensure stability in northeast Asia, the latest indication that Washington’s longstanding alliances in the region are fraying.