[BZ-1156297] fix classloader leak caused by ThreadLocal used in UpgradableReentrantReadWriteLock