logs-show: print multiline messages

[    0.019862] fedora kernel: CPU0: Thermal monitoring enabled (TM1)
[    0.019900] fedora kernel: Last level iTLB entries: 4KB 512, 2MB 0, 4MB 0
                              Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32
                              tlb_flushall_shift: 5
[    0.020118] fedora kernel: Freeing SMP alternatives: 24k freed
systemctl: remove extra padding from status output

In 131601349 'systemctl: align all status fields to common column',
padding was calculated for 'ListenStream: ...', etc. Later on in
45a4f7233 'systemctl: tweak output of Listen: fields a bit' output
was changed to 'Listen: ... (stream)', but calculation didn't change.

Just remove the calculation, since now the result will be always 8,
and it it more important to have everything aligned to the widest
field ("Main-PID"), than to save a few columns, usually at most two
(e.g. "Listen").

Note: strlen is more natural, and is optimized to sizeof even
with -O0.
Allow for the use of @ in remote host calls

Without this you have to use %40 with the -H flag because dbus doesn't
like the @ sign being unescaped.
service: don't report alien child as alive when it's not

When a sigchld is received from an alien child, main_pid is set to
0 then service_enter_running calls main_pid_good to check if the
child is running.  This incorrectly returned true because
kill(main_pid, 0) would return >= 0.

This fixes an error where a service would die and the cgroup would
become empty but the service would still report as active (running).
journalctl: fix verbose output when no logs are found

$ journalctl -o verbose _EXE=/quiet/binary -f
-- Logs begin at Sun 2013-03-17 17:28:22 EDT. --
Failed to get realtime timestamp: Cannot assign requested address

JOURNAL_FOREACH_DATA_RETVAL is added, which allows the caller
to get the return value from sd_journal_enumerate_data. I think
we might want to expose this macro like SD_JOURNAL_FOREACH_DATA,
but for now it is in journal-internal.h.

There's a change in behaviour for output_*, not only in
output_verbose, that errors in sd_j_enumerate_data are not silently
ignored anymore.

https://bugs.freedesktop.org/show_bug.cgi?id=56459
dev-setup: do not create a dangling /proc/kcore symlink

https://bugs.freedesktop.org/show_bug.cgi?id=65382
https://bugs.gentoo.org/472060?id=472060
journal: simplify match_free_if_empty
journal: add ability to filter by current user

This is the just the library part.

SD_JOURNAL_CURRENT_USER flags is added to sd_j_open(), to open
files from current user.

SD_JOURNAL_SYSTEM_ONLY is renamed to SD_JOURNAL_SYSTEM,
and changed to mean to (also) open system files. This way various
flags can be combined, which gives them nicer semantics, especially
if other ones are added later.

Backwards compatibility is kept, because SD_JOURNAL_SYSTEM_ONLY
is equivalent to SD_JOURNAL_SYSTEM if used alone, and before there
we no other flags.
journalctl: add --system/--user flags

--user basically gives messages from your own systemd --user services.
--system basically gives messages from PID 1, kernel, and --system
services. Those two options are not exahustive, because a priviledged
user might be able to see messages from other users, and they will not
be shown with either or both of those flags.
journal: loop less in MATCH_AND_TERM conditionals

AND term usually don't have many subterms (4 seems to be the maximum
sensible number, e.g. _BOOT_ID && _SYSTEMD_UNIT && _PID && MESSAGE_ID).
Nevertheless, the cost of checking each subterm can be relatively
high, especially when the nested terms are compound, and it
makes sense to minimize the number of checks.

Instead of looping to the end and then again over the whole list once
again after at least one term changed the offset, start the loop at
the term which caused the change. This way ½ terms in the AND match
are not checked unnecessarily again.
journalctl: no color for --reboot-- when not on tty
Properly check for overflow in offsets
Use stdint.h macros instead of casts to print uint64_t values

Casts are visually heavy, and can obscure unwanted truncations.
journalctl: print proper IDs with --header

The same buffer was used for two different IDs, messing up
the output.
journalctl: print monotonic timestamp in --header
tests: add test for empty journal files

The headers are currently not printed properly: some "(null)"s appear.
journal: add sd_journal_open_files

This allows the caller to explicitly specify which journal files
should be opened. The same functionality could be achieved before
by creating a directory and playing around with symlinks. It
is useful to debug stuff and explore the journal, and has been
requested before.

Waiting is supported, the journal will notice modifications on
the files supplied when opening the journal, but will not add
any new files.
journalctl: allow the user to specify the file(s) to use

This is useful for debugging and feels pretty natural. For example
answering the question "is this big .journal file worth keeping?"
is made easier.
journal: remember last direction of search and keep offset cache

The fields in JournalFile are moved around to avoid wasting
7 bytes because of alignment.
journal: change direction tests to use the same convention (cp </> np)

The order was different in various places, which makes it harder to
read to code. Also consistently use ternany for all direction checks.

Remove one free(NULL).