Sir John Richardson (1771–1841), Judge of Common Pleas