systemd-python: allow Reader to be used as a context manager
journal: use sd_journal_close on error in sd_journal_new
journal: use _cleanup_

One log_debug() moved to match order in other functions.
journal,shared: add _cleanup_journal_close_
sd-journal: do not require path to be absolute

Seems natural to be able to specify relative directory,
e.g. with journalctl -D. And even if, this should be checked
in front-end code, not in the library.
Use bus_maybe_send_reply() where applicable

This is a followup to: commit 1a37b9b9043ef83e9900e460a9a1fccced3acf89

It will fix denial messages from dbus-daemon between gdm and
systemd-logind on logging into GNOME due to this.

See the previous commit for more details.
logind: Make more use of cleanup macros
logind: exploit previous cleanups and simplify returns
keymap: Fix touchpad toggling on Lenovo IdeaPad U300s

IdeaPad U300s needs mapping 0xf1 to f21 just like Lenovo V480.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
keymaps: Use F20 for micmute keys to be friendly to X.org

The "micmute" key code is outside of X.org's allowed range [1].
gnome-settings-daemon interprets F20 as "microphone mute" these days [2], so
use this until X.org either gets fixed or obsoleted.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=692071
[2] https://mail.gnome.org/archives/commits-list/2013-January/msg05822.html
keymap: Remap microphone mute and touchpad toggle for Lenovo U300s

Separate out Ideapad U300s to its own line and add Microphone mute key.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
shell-completion/bash/journalctl: suppress stderr
rules: move builtin calls before the permissions section

<heftig> kay: systemd commit 22582bb broke cups usb printing for me
<heftig> because the "lp" group isn't applied anymore
<heftig> SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
<heftig> moving this line to the end of 50-udev-default.rules restores correct behavior, as it's after usb_id
journalctl: use _cleanup_ in one function
systemd-python: add _Reader.closed attribute

This should make the file interface of _Reader complete.
man/catalog: fix synopsis and remind to free
systemd-python: add _Reader.get_catalog()

This one wraps sd_journaal_get_catalog.
systemd-python: add journal.get_catalog()

This one wraps sd_journal_get_catalog_from_message_id.
Thanks to Python namespacing, we can stick to a shorter name.
systemd-python: small cleanups

- separate methods with two empty lines for clarity
- avoid malloc(0) by specyfing private data size as -1
- add method name in error messages
journalct: beef up entry listing

The ability to dump catalog entries in full and by id is added.