JAVA-1164: Replaced use of ThreadLocal<Random> subclass (used to override initialValue()) with a method that explicitly gets the thread local value and sets it if it's null.
This avoids some nasty classloader issues that show up particularly in web applications, where this anonymous subclass is holding a reference to the entire web app classloader,
which is not released until the thread exits.