Sir George Thomas Staunton (1781–1859), Writer and Sinologist