Day, John, Sir, active 1773-1784, Advocate-General of Bengal