Sir William Alexander, 3rd Baronet — British lawyer (1797–1873)