at_console: ask systemd whether a user is at the console
systemd manages seats and users. This patch optionally asks systemd
whether a user is at the console. It used libsystemd-login for that, a
low-level library that allows querying this kind of information without
expensive round trips.
In order to be nice to the Debian folks this patch falls back to
traditional modes of operation if systemd is not found to be around.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>