Geojson export prep

This first pull request for https://bugs.launchpad.net/oq-engine/+bug/1198843.

The immediate goal is to add lossmap geojson export support. This branches accomplishes some refactoring and cleanup to accomplish that.