[Maurizio] added areRanges equals utility function and TextSelection.getDirection
commit bundle