The leaders of the two former Soviet satellites, far apart geographically and historically, behaved like old friends during a lavish summit in Pyongyang.