Relay queue size metrics

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