Update function rand_IT ( )

The new version is WAY faster. By replacing the loop in weighted_sample(
) with bisection, it takes ~4s for the test community, compared to ~390s
in the previous version.