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
Merge pull request #168 from mehlis/random

add mersenne twister