John Malcolm (1744–1825), Shipowner, Kirkcaldy