rmultinom2 function

Internal function that samples z's from a multinomial distribution