US president says he told Xi Jinping that Beijing had an 'obligation' to tell Kim Jong-un to avoid a seventh test