Better relay queue size 0.9.x

Backport of some master changes (+ a fix I made to those changes - #137) to 0.9.x to allow diagnosis of relay queue issues.