Former Conservative cabinet minister Michael Gove has been appointed as the new editor of The Spectator.