Makes all public functions in the Entropy module fully thread safe.

Also fixes issue #54.