Use an API function to extend the extent

This is a follow-up on #3010. The `earthquake-clusters.html` example does not work in compiled mode because it uses the `ol.extent.extendCoordinate` function which is not part of the API. This change makes it so `ol.extent.extend` is used instead.