Prevent failing if qgis.core is not available
Merge upstream and merge in custom_logging.py to handle the two exception types
Tidy Up
fix rst doc compile error
changed utilities call to use safe_qgis package name
Merge branch 'master' of github.com:AIFDR/inasafe
Remove reference to impact function merge dialog from inasafe-683 branch
Merge pull request #679 from vdeparday/master

Prevent failing if qgis.core is not available
tentative fix for html_renderer tests hanging
faster retry of the loadedFinished check
also changed the slot to accept a parameter  passed by the signal that indicates if the load was succesfull
Refactored the get default code to avoid trying to import safe_qgis 
all the time. now safe imports get_defaults, and if safe_qgis.__init__  is
called, then it monkey patches the safe.get_defaults to use 
safe_qgis.get_defaults
to do this I had refactored defaults to its own file to avoid a __init__ 
cascade that was loading the inpact function before safe_qgis.__init__
could monkeypatch the get defaults method.

this fixes #704 and probably all the related QPainter issues
correcting comments to compile with rst documentation