Keep IME character selection menu in one place during composition

f78a30a introduced a regression that caused the IME menu to appear to follow the caret across the screen as new characters are entered, rather than remaining anchored at the beginning of the composed text.

This patch adds some width calculations, and aligns parts of the caret overlay to either left or right side of the container. As the caret overlay is widened, the event trap will remain fixed to the left, and the caret + avatar handle will remain fixed to the right.

Additional fixes:
* Clean up Avatar styling and remove !important tags from webodf.css
* Redraw the caret if the composition sequence is aborted