Sir William Bryan Cooke, 8th Bt - (1782-1851), Sheriff of Doncaster