Gregson, William, active 1824-1847, Barrister