Sir John Melville (1802–1860), WS, Lord Provost of Edinburgh (1845–1859)