introduce metrics::intervals, sliding time aggregate statistics
use nostacksize_t to evolve deprecated APIs
omit needless namespace refs; use nullopt
test metrics::intervals
cosmetic tweaks - const, indent
use synchronized<> to keep thread list