Only update the cursor selection once per mouse-down

In Chrome, right-clicking repeatedly generates both a contextmenu AND
a mouseup event for subsequent clicks. E.g. a sequence of right clicks
generates:
1st - mousedown, contextmenu
2nd...nth - mousedown, contextmenu, mouseup

This causes problems when clicking on images as the selection is
immediately reset after being processed by the first context menu,
causing the subsequent mouseup event to try and reset the cursor
selection *again*.
Hide the cursor anchor element

This is not a visible element. It is used only to track selection
ranges inside the document.
Add some additional documentation to mouse click handling
Maintain selection when right-clicking on a range that ends at an image

On OSX, right-clicking on an image at the end of a range selection will
hit this particular branch. The image should remain selected if the
right-click occurs on top of it as technically it's the same behaviour
as right clicking on an existing text selection.
Merge pull request #483 from peitschie/right-click-behaviour

Improve right-click behaviour near and around images
Migrate avatar CSS rules from editor to webodf.css

Each css file contained some of the rules required for the avatar display.
There are enough stylistic elements in webodf.css the avatars look strange
if the editor.css rules are not present.

Clean up this problem by merging all the rules into webodf core.
Improve avatar alignment to centre better with relation to the caret

The avatar was not staying well centred over the caret, and wouldn't move
vertically when the caret grew to match the text size. The easiest way to
ensure these stay properly aligned is to wrap both inside a sub-container.
Merge pull request #574 from peitschie/caret-avatar

Improve avatar alignment to centre better with relation to the caret
Make caret and avatar overlays rather than inline content

Having the caret and avatar display inside the cursor node causes text
wrapping and other element shifts to occur in some browsers (mainly FF)
due to there being layout impacts from the almost-but-not-quite 0-width
cursor element.

Moving to non-inline overlays for these bits of chrome allows the cursor
to be hidden completely.

TODO
This commit introduces a regression when composing text using an IME
as the overlay doesn't advance properly during composition.

Fixes #86
Fix caret placement when composing text via the IME

If the cursor node itself is visible, use the bounding rectangle from that
as the highest priority for the caret position.