improvements to restart logic, esp for nginx; and related

a `CountdownTimer` convenience class

plus a new sensor for reqs-per-sec for mysql, since it was easy (we were running the command anyway);

and some string mangling routines to help simplify, in case we want to do more such