Don't perform a scenario computation for no gmvs
Small fix in dump_hazards.py: the filenames list contained duplicates
input/logictree:

Refactored logic tree implementation a bit to support reading of logic
trees from the DB. Also added `read_logic_trees_from_db`.
engine:

When bootstrapping a hazard calculation, parse the source model logic
tree and collect all of the source model file paths. Then load them
into the DB.
input/logictree:

Removed an obsolete function `read_logic_trees_from_fs`.
input/logictree:

Removed some obsolete _open_file functions.
tests/input/logictree_test:

Big test overhaul. Refactored some tests so that they pass, and removed
some obsolete ones.
calcs/hazard/general:

Use the new `read_logic_trees_from_db` function in the hazard
pre_execute.
tests/db/models_test:

Updated a test per new input loading functionality.
Changed the behaviour to raise an error for empty GMVs
Merge branch 'master' of github.com:gem/oq-engine into skip_empty_gmv_array
Improved a comment
input/logictree:

When reading source models from the DB, encode the content as utf-8
(intead of casting to a string) before parsing. This is less
error-prone.
db/models:

Added a `as_string_io` property shortcut to ModelContent.
input/logictree:

Refactored some parts to use a slightly more DRY way of referring
to model content, with StringIO objects, etc.
calcs:

Refactored parts of code that were referring to the raw model content
and made them a bit more DRY.
tests/input/logictree_test:

All tests pass.
engine:

`_collect_source_model_paths` now returns a duplicate-free list of
source paths.
Merge pull request #1255 from larsbutler/read-logic-trees-from-db

Read logic trees from DB (instead of the filesystem)

[r=matley,micheles] [f=*1206913]
engine:

Extended the `run_calc` interface to support the option to disable the
job supervisor (and thus, NOT fork the process).