Try to use GCC instead of cc and make sure Accelerate is in the right place
Repeatable randomization (CUDA).
THC: revamped random engine.

The seed is now changed each time a new vector is sampled.
This was done in order to decouple our engine as much as possible from
the internals of Thrust.
Fixed CUDA random generation entirely.

The state machine is now called piece-wise, by blocks of size 2^24
at most. 2^24 turns out to be the max precision for single precision
floats (mantissa). Since the randomizer's state is encoded into the
vector itself (floats), it was the easiest fix.
add getRNGState and setRNGState functions to get/set the state of random
number generator. These provide the ability to replay a sequence of
random numbers from a given arbitrary point in time.

This commit provides the same capability as pull request #129
(https://github.com/andresy/torch/pull/129)
silence warnings about implicit cast
Complete (and final) revamping of the CUDA rand engine.

New:
* based 100% on CuRand

* reproduced seed interface from Torch:
    cutorch.manualSeed(seed)     : set a seed for repeatable experiments
    seed = cutorch.initialSeed() : retrieve initial seed
    cutorch.seed()               : force seeding (this is done once on startup)

* I only implemented the distributions that were meaningful
  for floating point tensors (CUDA is float only for now):
    uniform(a,b)
    normal(mean,std)
    logNormal(mean,std)
    bernoulli(p)
    cauchy(median,sigma)
    exponential(lambda)
    geometric(p)
Merge remote-tracking branch 'andresy/master'