With systemd it's easy to manage several instances of picomon (via templated
units) so this should be quite usefull.
Also we switch to /etc/picomon for config (instead of %prefix%/etc/picomon)
as /usr/local/etc don't seem to exist for real and that way it's not abnormal
to ship the unit in /etc too. Also it's easier to manage the config at only
one place (think about etckeeper etc.).

We used to drop any mail we tried to send, regardless of whether
sending it actually succeeded or not. This could result in lost mails
if the server failed to accept some mails for any temporary reason.
Fix this by re-queuing emails that failed to send and wait a few
moments before retrying.

As the user configuration is now loaded after the mails module, there
is a race in the mail thread that fetches configuration options, which
may or may not already have the user's value.
So, remove caching of those value, which leads for them to be read much
later after everything has properly been initialized. The timeout
setting might still have the default value on the first loop run, but
this doesn't matter as the server isn't started at this point anyway.

Now the 'every' check parameter can have a default value set globally and the
former global 'error_every' parameter can be overridden on a per-check
basis, so that the two parameters' configuration is now homogenous
and much more flexible.

Don't account for a task in the `finally` handler as we actually got a
task only if we didn't receive an exception. This cleans up the code
and possibly fixes it if we ever get any other exception than a
timeout.

Don't explicitly handle KeyboardInterrupt in the mail thread as it
doesn't seem it ever was of of any use, and could actually lead to
a deadlock as it would terminate the in-thread loop without emptying
the queue, leading to `queue.join()` in `quit()` to wait forever for
the queue to empty.

A stupid typo lead for the mail thread not to be a daemon thread, thus
preventing Python from quitting before that thread quits by itself.
So properly make it a daemon thread, and as it would now actually get
interrupted abruptly, register an atexit handler to cleanly quit it.

This fixes ThreadedSMTP.quit() when the connection to the server is
down as Queue.join() will wait for all tasks to be popped and accounted
for, but we wouldn't account for the fake (empty) task because the
connection to the server would not be open.
So, properly differentiate a closed connection from a queue timeout.