Chinese President Xi Jinping has urged Thailand and Cambodia to resolve their border dispute after meeting both countries' leaders on the same day.