use thread_local instead of ThreadLocal for some statics in Random