The island was ceded to the British in 1796 , became a crown colony in 1802 , and was formally united under British rule by 1815 .