THRandomState: Add a typedef to keep consistency with the rest of TH
THRandom and users: Add a THRandomState* pointer (can be NULL) And THRandom_{init,done}()

Lua bindings are not updated for this yet.
TorchCFlags.cmake: Add a test for __thread presence