Wrap RNG state into a table

This involves hiding the C functions from the user, to keep things
as simple as possible, at the price of more convoluted files.