Hartley, Thomas, active 1783-1798, Lord Mayor of York