Thomas Barclay 1728-1793: Consul in France, Diplomat in Barbary