apitrace refresh

Looks like a fair bit of activity in apitrace-land.
I'm not sure this merge is absolutely perfect, but it builds on Linux and the diff w.r.t upstream looks about right.