Fix computation of number of thread blocks in random number generator.

Move definition of DIVUP from THCTensorCopy.cu to THCGeneral.h.
Use DIVUP to compute the number of thread blocks for random number
generation.