refactor, and added test case for verifying the thread pool properties. problem: metricsRollingStatisticalWindowInMilliseconds, and metricsRollingStatisticalWindowBuckets wouldn't be set correctly