Add toString, equals and hashcode to TextPosition and Textrange