Change seed functions to give the same random numbers on 64 and 32 bit machines.
Merge pull request #1881 from andreasnoackjensen/randomrepro

RFC: Reproducible random numbers