Since Mathieu tried adding more !DEADLINE aware tracing and I'd been neglecting Xunlei's patches, I figured I'd have a go at all that.
Here a stack of patches I ended up with looking at the assorted 'features' in our PI code. The code is compile tested only, contains some notes and in general needs more love.

