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
I have only one doubt here: You can have a situation in which the source model logic tree is very complex, while the GMPE logic tree is rather simple (say one GMPE per tectonic region). In this case the number_of_logic_tree_samples will be definitely higher than the number of paths in the GMPE logic tree. In this case the warning is misleading