US president Donald Trump said "racism is evil" as he condemned the KKK, neo-Nazis and white supremacists as "criminals and thugs".