Factoring out common WMS code

This change also introduces a WMS source interface that both
TiledWMS and SingleImageWMS implement. It provides an
updateUrlFunction method which can be used to accomplish things
like mergeNewParams in OpenLayers 2.