US secretary of state secures release of US detainees after meetings with North Korean officials in Pyongyang.