British academic Matthew Hedges, who was last week jailed for life in the United Arab Emirates on a spying charge, has been pardoned.