President Donald Trump has criticised intelligence officials and the media over what he called "very, very unfair" treatment of his ousted national security adviser Michael Flynn and for "illegally leaked" information about reported contacts between his campaign advisers and Russian officials.