[WIP] Introduce geometryFunction for rendering

This is an alternative to #3010.

`ol.layer.Vector`, `ol.FeatureOverlay` and `ol.source.ImageVector` now support a new geometryFunction option. This function, called with the feature, the resolution and a style, allows application developers to return a geometry different from the original feature geometry.

I'm going to add an example and also add a `geometryFunction` option to the interactions that create a feature overlay, but before I spend more time on it I would like to hear from @tschaub and @elemoine if this approach is better than #3010.

Oh, and @tsauerwein, if this is used to draw an arrow on a linestring, you can use `setRotation()` on the arrow style that is passed to the `geometryFunction` to set the rotation that you calculate from the line segment's gradient.