This adds a basic SB API for creating and stopping traces.
Note: This doesn't add any APIs for inspecting individual instructions. That'd be a more complicated change and it might be better to enhande the dump functionality to output the data in binary format. I'll leave that for a later diff.
This also enhances the existing tests so that they test the same flow using both the command interface and the SB API.
I also did some cleanup of legacy code.
Do you have clients that already rely on these functions? Writing deprecated above them means nothing. When I was doing the reproducers, I included a warning in the header saying that this was under development and the API wasn't final, which allowed me to iterate on it. Can we just remove these methods and to the same here?