Algorithms/randomalg: algorithm now better matches the openstack one

Resource is now randomly chosen from a set on N best resources sorted by
a criterion

Signed-off-by: Artem Plakunov <artacc@lvk.cs.msu.su>