improve/fix `create_nonce()` impl by using a `mersenne twister` implementation and protecting it with a `mutex`