Add GetSelectionIsCollapsed and GetSelectionRangeCount().
Reorg UpdateCarets.