Small cleanup to cursor insertion logic

Don't need to walk through each sibling to find the correct offset.
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.
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
Improved API dox for the steps cache implementation
Ensure reported step changes are accurate when splitting paragraphs

Paragraph splitting carried a very slight optimisation that would insert
the new paragraph before the current one if the current paragraph was
empty. This would cause the reported step position start to be incorrect
as the actual step that changed was position−1.

This alternate code path has been removed to ensure the reported step
changes are always correct.
Correct the reported steps removed when deleting an annotation

The reported position is the first walkable step inside the annotation.
This step will be removed entirely when the annotation is deleted, so
the stable step is just before.