Ex-FBI director James Comey has been charged with obstruction of justice and making a false statement to Congress.