Rescale map after adding markers with labels

Markers with labels are added through callback to mw.loader.
Which means that they are not available when the map is scaled
to show all markers. Therefore I have extracted the rescaling code
into two functions (getBounds and setZoom) which can be called at the
original location for this code and after adding marker with label.
Split into two functions as code for centering the map also
needs the bounds object.

This commit was merged in Oct 2012, but for some reason it doesn't
exist on master (or 3.0.x), so I'm submitting it again

Fixes bug 40791

Change-Id: I61dbd498461c82fc04d622b5a2f7937d7f660af9