The US and China have agreed to a framework that restores a truce in their trade war after two days of talks in London.