use ThreadLocal<Random> instead of creating Random each time

* We can't use ThreadLocalRandom because we need to support JDK6
Merge pull request #735 from HeartSaVioR/use-threadlocal-random-instead-of-creating-random-each-time

Use ThreadLocal<Random> instead of creating Random each time