Hayes, William, active 1824-1847, Barrister