This helper class will make the transition to Error/Expected easier.
The immediate benefit is that it keeps track of the number of soft errors encountered, which can help during debugging. The future benefit is that SoftInstrProfErrors can be made undroppable by adding a simple destructor: this lets us handle soft errors properly with a significantly reduced malloc overhead.
Another benefit is that it lets us delete some error-tracking code in the main "merge" and "scale" logic.
Add some comments to the class.