Refs #55, adds some populate tests and improves data generation in TestEnvironment.

Added a chance() function to TestEnvironment, so given a number between 0 and 1, it will return true with a given probability. Improved the randomness with which users are generated. Changed rand() to mt_rand() everywhere.