Don't expand paragraph boundaries outside the current root

The surround paragraph found by traversing the start or end container may
be outside of an inline root. OdtUtils.getParagraphElements has logic that
prevents traversal out of the current root into a new root.

Fixes issue #300
Removed duplicate function OdfUtils.getImpactedParagraphs
Merge pull request #306 from peitschie/triple-click-fix

Don't expand paragraph boundaries outside the current root
Fix parameter annotation for getAppliedStylesForElement of Formatting.js
Preserve the direct cursor style when spliting at the end of paragraph.

At the moment, spliting at the end of the following paragraph
<p style-name="standard">hello <span style-name="bold">world|</span></p>
will create a new paragraph like below
<p style-name="standard">|<span style-name="bold"></span></p>

The cursor is moved out of the span due to empty span is not considered as
a valid cursor position in the current design. this causes newly entered
text are not formatted corretly.

The workaround: first merge the paragrpah style and direct cursor style (if any) into a new automatic style; and then apply it to the newly created paragrpah.