Logan, William E. (William Edmond), Sir, 1798-1875