The North Korean leader, who has rejected offers to meet with President Trump, has accepted the Chinese leader Xi Jinping’s invitation for a state visit “soon.”