Don’t ask the cursor to move to −1 when the annotation is at position 0
Replacing non-edit related uses of OdtDocument.getPositionInTextNode with faster alternatives

Calling getPositionInTextNode adds unnecessary empty text nodes
into the document. This function should only be used by operations
that are about to insert text or otherwise edit the DOM.

As part of this patch, the position checks are limited to the current
editing root, fixing issue #48.
Extract TextPositionFilter into standalone class for easier tuning and testing
Extract StepsTranslator interface to allow a safe interface to start caching improvements
Requesting negative steps or too many steps will return 0 or doc length

Further improve the safety of the steps translation API. Requesting
invalid ranges will log a warning and return an appropriate step.
Cope with translating DOM points outside the root node to steps

Previously, various consumers needed to be careful about only
asking for nodes inside the root node. Failure to do so resulted
in unpredictable behaviour.

To simplify the interface and improve the system robustness, this
rounding is now taken care of behind the StepsTranslator interface.
Respect paragraph boundaries in DOM point to step translation

In almost every case, when a consumer of the step translation API
asks for the step equivalent of a position between a paragraph boundary
and the first walkable step in the paragraph, they actually desire the
first walkable step.

This change treats (paragraph, 0) as the first walkable step in the paragraph
at all times.
Add signals necessary to keep a caching implementation in sync with the document
Add caching for steps to DOM point conversion
Reset steps cache when the document root is replaced (i.e., cope with undo!)
Find a nearby known cached point when requested DOM point is outside any cached areas
Use cached step translator to speed up cursor movement operations

The new step translator is also stricter about the requested number
of steps and will assert if more steps are requested than are available
in the document. This revealed a test that was asking for an invalid
step.
Simplify select-all codepath to not require custom iterators
Use cached step translator to speed up text removal operations
Refactor getPostionInTextNode to use cached step information

The new implementation should be equivalent in every way, except
it now is able to benefit from the cached step information to be
significantly more faster.

This patch also addresses parts of issue #3.
Use cached step translator in the annotation manager to speed up performance