Code from Active Analytics Blog: Random number generation using variadic template functions, and threading in C++11 and R with Rcpp