Refactoring: moved risk calculation logic to risklib

This is a companion pull request of https://github.com/gem/oq-risklib/pull/55

See https://bugs.launchpad.net/oq-engine/+bug/1198261 and https://bugs.launchpad.net/oq-risklib/+bug/1198259 for more details.

This pull requests also try to uniform the way we are performing QA tests for the risk calculators. Instead of running long hazard calculations, we load pre-computed test fixtures (dumped with our dump tool) and run tests given such input hazard data. This will allow us to use high-resolution hazard data, and make QA tests that are seed-independent (like the current QA test for event based).

Build status: http://ci.openquake.org/job/zdevel_oq-engine/84/