Sir William Allan 1782–1850