Refactored TH to not use global state for random number generation.

* Style / naming needs work.
* Breaks other layers within torch
Starting point for wrapping the mersenne state in a Lua object.
Miraculously bulds. Very unhappy when you try to run it.
qth runs, can call random methods if you explicitly pass a generator.
Create a generator in the lua torch scope.
Torch tests now pass! Allow all random functions to use the default generator if one isn't supplied when calling the function.
Rename mersenne_state to THGenerator.
Heinous bug.
Fix build warnings.
Indentation, whitespace, comments.
Reorder arguments to Tensor functions.
Whitespace. Duplicate #define.
Merge pull request #13 from timharley/thgenerator

Make random number generator state a TH type