US President Donald Trump has pardoned his former national security adviser, Michael Flynn, who twice pleaded guilty to lying to the FBI.