consolidate all thread-based structures, remove old expired threads