Add Mersenne Twister library by Takuji Nishimura and Makoto Matsumoto

Adapted somewhat for C++.
Use Mersenne Twister instead of rand()