Use dedicated class, _CPStateMarker, instead of CPString for selection markers.
Use UID instead of hash.
Fixed return type for _placeholderForMarker:
Fixed parameter type for _placeholderForMarker:
Merge pull request #1826 from stewa/non-string-markers

New: use dedicated class instead of CPString for selection markers

Previously, selection markers were strings, which allowed the possibility that user data could be mistaken for a selection marker.

With this commit, selection markers are global instances of a private class, removing the possibility of clashes with user data.