Former US president Donald Trump ordered to pay at least £300,000 ($382,000) in costs after losing a UK court case against a former spy who compiled a controversial dossier about him.