Add `ol.ObjectEvent` for changes to `ol.Object` properties. Previously, `ol.Object` dispatched instances of `goog.events.Event` with type `change`. Now `ol.ObjectEvent` instances will be dispatched on property changes. The events include a `getKey` method to get the name of the property being changed. The `beforepropertychange` type event is fired before a property value changes, and the `propertychange` type event fires after the property value changes.
Any event target can be used to dispatch generic goog.events.Event instances with an arbitrary type. In cases where we dispatch custom events, we should not use type values that collide with those used for generic events (at least internally). This allows listeners a better chance of knowing what kind of argument they will receive.
As subsequent change will clean up the enumeration and add a bit more consistency.
This adds a bit more inconsistency to the library, but we didn't have complete consistency before. Almost all existing string enum values are lowercase (a couple are camelCase and one is dash-separated). The closure library isn't consistent either (with case for enum properties or values). I imagine this could be justified in saying someone could blindly use GeoJSON type values in places, but in the end, you'll need to read the docs before guessing right.
The hit detection code doesn't correctly play well with the skiping of geometries using the renderGeometryFunction. Features/geometries that are not rendered by the replay API are not detected by the hit detection mechanism. For that reason, until we find a solution, we don't use renderGeometryFunction in the vector-layer example.
This separates the action of requesting an extent to be loaded from the action of requesting cached features. The renderer (or any other consumer of a vector source) calls load to request a data extent. A `featureload` event fires when new features are loaded. The renderer (or any other consumer) separately asks for cached features given an extent. This vector source only loads features once, but this separation will also work with sources that make multiple requests for data in different extents.
This also removes the `data` option from the vector source in favor of a `features` option. Since we no longer have shared data structures for geometries, people can manually create features and pass them to a vector source. The `addFeatures` method is exported as well. This is used to add features to a source that don't have a representation on the "remote" (or server).