Don't assume caret overlay is a child of the current OdfCanvas sizer

Any calls to OdfCanvas.setOdfContainer will reset all the odf canvas
children, and may create a new sizer. By using the parentNode of the
overlay directly, the Caret can be safely cleaned up if this occurs.
Remove any active members before replacing the document element on undo

The members are effectively removed and then re-added during an undo.
Replacing the document element actually resets the OdfCanvas and related
sizers, so the members should be removed before this reset occurs.
Ensure focus is returned to the event trap after an undo

This behaviour regressed in c0332ed due to the caret overlay element
being moved inside the overlay itself. As a result, the event trap was
automatically being re-added after an undo, causing the SessionController
to incorrectly skip returning focus back to the trap upon completion.
Merge pull request #598 from peitschie/caret-overlay-destroy

Fix regression during undo