Chinese President Xi Jinping and Russian President Vladimir Putin held talks in Shanghai ahead of a trilateral summit involving Donald Trump.