Donald Trump was sworn in as the country's 47th president, in a ceremony that also marked his comeback to Washington.