Determine font styling from the inline cursor instead of overlaid caret

The caret is no longer inline with the text content, so the font style
of this doesn't match the position of the cursor in the document.
Merge pull request #708 from peitschie/ime-style-fix

Determine font styling from the inline cursor instead of overlaid caret
Fix crash when:

1. No style:list-level-properties is present.
2. No style:list-level-label-alignment child of that is present.
   In this case, it simply falls back to default zero margins and
   bullet widths.

Previously this would simply not load documents which did not come
with this optional element in a list style.

Layout tests and CSS generation tests are added for both cases.