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
This is not the case. Consider for instance the test classical/case_16 which has a very complex source logic tree with thousands of paths and a trivial GMPE logic tree with a single branch. In that case the warning is not raised. Why? The number of sampling in that test is 10. The number `num_ind_rlzs` is obtained by summing the number of GMPE paths (i.e. 1) for each sm_lt_path (see line 431). Therefore `num_ind_rlzs` is 10 which is not bigger than the number of samples (10) and the warning is not raised. In this case the same GMPE will be used 10 times, but the numbers will be different because the sources will be different, corresponding to different realizations of the source model logic tree. Perhaps the name  `num_ind_rlzs`  is misleading and you can suggest a better name.