mainloop: Add support for systemd notifications

When compiling with systemd support, notify systemd about our status
and readiness via sd_notify().

Also set the service type to Type=notify in the systemd unit file.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>