Improve type checking with @struct

OK, this turned into a bit of a monster.

The compiler has a `@struct` annotation that allows you to ensure that all properties are initialised in the constructor (very important for performance on V8) and that you don't mix `obj.prop` and `obj['prop']` property access styles in the same object. Enabling this revealed a large number of type-related problems, especially relating to the use of the `ol.IView` and `ol.IView2D` interfaces. This PR fixes them and adds `@struct` annotations in a number of places.