Fix problem where SVG image was not loading on start

Previously I tried fixing the problem by loading the background image
every time the map size changed, which, as Dimitry has mentioned, was
not a good idea. I realised later that the problem arose from the fact
that the size of the SVG image was not set until after the first blank
render. The only essential change here are the changes made in the
SVGViewerFactory: the rest is some refactoring that I did while trying
to fix the problem.