This is the final patch in the work I've done so far to support Process plugins (or their associated OS Plugins) not reporting all threads on every stop.
This commit moves the thread plan updating and dumping into the ThreadPlanStackMap. It adds a setting (target.process.plugin-reports-all-threads) you can use to indicate that you want us to preserve unreported thread plans, and a "thread plan prune" command you can use to remove any orphaned plans.
If this is approved, I'd like to check in all these pieces. At this stage if you opt into preserving ThreadPlanStacks, the process is pretty minimal. I want to get this more by-hand version working because there are a lot of OS Plugins in the wild (there's on in every mach_kernel dSYM) and we have not supported them well. So I want to get something that supports the extant plugins.
The next step is to add a way for the plugins to sync up with the thread plans, and then call that at public stop time, but I'd like to do that as a separate patch.
If this is relevant only for os plugins, then it would be good to reflect that in the name as well.