Trump heads to Asia for key talks with Xi and Putin as election setbacks and China-linked spy allegations raise tensions.