Restored the source model sampling feature

See https://bugs.launchpad.net/oq-engine/+bug/1312020
Also some refactoring of the logic tree processor and removed several lines of code.
Tests running here: https://ci.openquake.org/job/zdevel_oq-engine/389