Refactored initialize_realizations and added a warning when num_samples > num_realizations

See https://bugs.launchpad.net/oq-engine/+bug/1327027. This branch requires its companion https://github.com/gem/oq-commonlib/pull/21.
The tests are green: https://ci2.openquake.org/job/zdevel_oq-engine/445
ok undestood