William Beckford, Lord Mayor