Thailand and Cambodia have signed an expanded ceasefire agreement during a ceremony attended by President Donald Trump.