Allow styles to override feature geometries

With this change, application developers are able to define styles that
render a different geometry than the feature geometry. This can e.g. be
used to render an interior point of a polygon instead of the polygon, or
to render symbols like arrows along lines.
Add an example showing the use of ol.style.Style#geometry
Add tests for setGeometry
Use getGeometryFunction() in immediate API
Allow geometryFunction to return undefined
Create typedef
Assert that feature.get('foo') returns a geometry
Add a getGeometry method
Merge pull request #3010 from ahocevar/style-geometry

Allow styles to override feature geometries
Cache the buffered extent value

Assuming that the maxExtent and resolution property are immutable