Sir William Hamilton, 9th Baronet — Scottish metaphysician (1788-1856)