Add straightforward type annotations.
Also add a check to updateJS.js to avoid hanging when calculating the dependencies.
Add type information to odf.OdfContainer.
Add more straightforward type annotations.
Break circular dependency between odf.OdfCanvas and gui.AnnotationViewManager.
There is new a new class AnnotatableCanvas that is used by gui.AnnotationViewManager.
Make AnnotationViewManager 100% typed.
Make Style2CSS 100% typed.

The code is much more readable now and some inefficiencies are resolved now.
E.g. in one place an array was iterated like it was an object.
The use of getElementByTagnameNS has been replaced by more efficient
getDirectChild.
Break circular dependency between Formatting and TextStyleApplicator.
Fix wrong index and missing prefixes in Formatting unit test.
Make odf.Formatting 100% typed.
Make gui.StyleHelper 100% typed.
Make odf.OdfCanvas 100% typed.
Make gui.SelectionMover 100% typed.
Simpler detection of circular dependency.
The new check detects a circular dependency immediately instead of bailing out after a large number of iterations.
Merge pull request #233 from vandenoever/typechecking

Add more type information.
Don't synchronize browser & WebODF selections unnecessarily

The window selection only needs to be synchronized with WebODF on a
mouse down operation. In all other cases, the selection doesn't need to
be maintained. Removing the selection most of the time significantly
helps performance as there is heavys costs to modifying part of a DOM
tree that is selected.

In order to allow cut/copy to continue to function, an event trap was
necessary that "holds" the selection after mouse-up. This is set as
content editable to allow the cut/copy events to be fired in Firefox and
Safari.