Function for getting extent intersection
Layer extent option

If provided, the layer extent will be used to limit data requests and rendering.  If undefined, to limit will be imposed.
Limit image layer requests to layer extent

This has two nice consequences that can be seen in the wms-image.js example:

 * no images are requested when you browse outside of the layer extent
 * when the layer extent is within the viewport extent, cached images are used since the intersecting extent is the same for multiple viewport extents