Lushington, Edmund Henry, 1766-1839, Chief Justice of Ceylon