Changed rand() calls to bm_rand() if they should be mockable, and mt_rand() if not
Merge pull request #1231 from blackshadowshade/1128_rand_replace

Changed rand() calls to bm_rand() if they should be mockable, and mt_rand() if not