Fix regression during undo

Various OdfCanvas and undo-related behaviours clear all children of the canvas. In this case, the caret that is going to be destroyed has already been removed. Just silently do nothing in this case.

In addition, 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.