Merge pull request #48 from timharley/master

Fix a bug in getRNGState/setRNGState
Make the THGenerator next field an offset.