random.cpp: vector version of random_int
Add Rcpp::exception calls in .cpp code