Donald Trump has been convicted in a criminal trial: the first time for a former President in US history.