China’s navy test-launched a long-range ballistic missile from one of its nuclear-powered submarines in the South Pacific in a rare move.