Which kingdom, established by King Wickramabahu in the 14th century, repelled invasions by the Portuguese and the Dutch in the 16th, 17th and 18th centuries and the British in the 19th century, until the signing of a treaty with the British in March 1815?