Allow resetting of the generator state in the event of error

This commit adds the ability to reset the generator state back to clean, which is good enough for me. I thought about adding a state save feature to allow rolling back, but this is sufficient for my needs and does not require free/alloc/reconfiguring to get back to a known good state.