Source ordering

This is necessary in order to implement filtering by source. See https://bugs.launchpad.net/oq-engine/+bug/1352372 for the details.
The tests are green: https://ci.openquake.org/job/zdevel_oq-engine/531