Revert "Maintain stats per thread, and other cleanup."

This reverts commit a4864e7310f4d5ffc1a20773da3c3f46d6c90c13.