Merge "Tracking number of threads in threadpools. Added tests for max total thread count."