stats trigger cleanup for relays

in some cases, stats were being generated needlessly, eg on a relay retry delay
or not at all, like when an on-demand relay is restarted again. Some redundant
code removed as well.