add mersenne twister
Update on @mehlis' Mersene twister code

* Consistent naming
* C99 style variable definition
* Code de-duplication through mathematical conversions
* Less magic numbers (higher powers of twoof two))
fixes for PRNG