run event handlers in name order

(and deal with tiny cleanup from that change)
handy email diagnostic tool; factor me out!
failing test: do not deact right after psync!
do not terminate service right after a psync

First, decline to terminate due to lack of funds if a psync invoice
was recently created for this service.  That way, if a consumer's
price jumps way up at the end of its lifetime, the customer will
have a chance to read the invoice and decide to pay!

Since we normally (quite reasonably) do our psync check *after* we
charge for a day, we insert an attempt to psync before deactivation.
That way, if the change in rate is what would cause the consumer to
be deactivated for lack of funds, a psync can be sent out.

We only do that if there wasn't a recent psync, of course, but we
need that check to look a bit further than the normal check.
Otherwise, we'd always send two psyncs, one of which would be
noticing the change in expiration date caused by living past the
originally predicted date.

This does not appear to be an obvious, elegant, and robust way to
solve the "do not deactivate after psync" problem, but it's the best
one I could come up with for two days, and this problem is pretty
rare and does not deserve more time than that, right now.
Do not expire too soon after a psync