US President Donald Trump has defended his decision to sack FBI director James Comey, saying Democrats and Republicans will thank him for it.