Implement ThreadProgress class. Fixes #16