sd-event: split run into prepare/wait/dispatch

This will allow sd-event to be integrated into an external event loop, which
in turn will allow (say) glib-based applications to use our various libraries,
without manually integrating each of them (bus, rtnl, dhcp, ...).

The external event-loop should integrate sd-event int he following way:

Every iteration must start with a call to sd_event_prepare(), which will
return 0 if no event sources are ready to be processed, a positive value if
they are and a negative value on error. sd_event_prepare() may only be called
following sd_event_dispatch(); a call to sd_event_wait() indicating that no
sources are ready to be dispatched; or a failed call to sd_event_dispatch() or
sd_event_wait().

A successful call to sd_event_prepare() indicating that no event sources are
ready to be dispatched must be followed by a call to sd_event_wait(),
which will return 0 if it timed out without event sources being ready to
be processed, a negative value on error and a positive value otherwise.
sd_event_wait() may only be called following a successful call to
sd_event_prepare() indicating that no event sources are ready to be dispatched.

If sd_event_wait() indicates that some events sources are ready to be
dispatched, it must be followed by a call to sd_event_dispatch(). This
is the only time sd_event_dispatch() may be called.
sd-event: sd_event_prepare - stay in PREPARED if sd_event_wait() indicates that no sources are pending
update TODO
Revert "systemctl: fix broken list-unit-files with --root"

This reverts commit 41a451cc2901a5deb985aea4cc8de204a22e5612.

This breaks checks for masking of units file, since we invoke
null_or_empty_path() on the resulting path.
udev: hwdb - do not look at "usb_device" parents

Based on a patch from Simon McVittie <simon.mcvittie@collabora.co.uk>.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758050
update TODO
NEWS: Fix typos.
missing: add BPF_XOR

BPF_XOR was introduced in kernel 3.7
networkd-wait-online: add missing short option 'i' to optstring
test-compress: make sure asserts with side effects use assert_se()

Otherwise the test fails when built with CPPFLAGS='-DNDEBUG' which disables
assertions.

Tested:
- make check TESTS='test-compress' CPPFLAGS='-DNDEBUG'
test-path-util: use assert_se in all assertions

Otherwise they get optimized out when CPPFLAGS='-DNDEBUG' is used, and that
causes the tests to fail.

Tested:
- make check TESTS='test-path-util' CPPFLAGS='-DNDEBUG'
test-util: use assert_se() for call to safe_mkdir with side effect

Otherwise it gets optimized out when CPPFLAGS='-DNDEBUG' is used.

Tested:
- make check TESTS='test-util' CPPFLAGS='-DNDEBUG'
sd-bus: remove unused call bus_kernel_create_monitor()

Noticed by Djalal Harouni
systemctl: Correct error message printed when bus_process_wait fails

Actually use the variable containing the return code of bus_process_wait when
printing the error message as a result of it failing.
sd-bus: don't include internal header memfd.h in public header sd-bus.h

https://bugs.freedesktop.org/show_bug.cgi?id=83097
util: make sure reset_all_signal_handlers() continues with all other signal handlers when one sigaction() fails

After all, we usually don't check for failures here, and it is better to
do as much as we can...
util: reset signals when we fork off agents

If we invoke agents, we should make sure we actually can kill them
again. I mean, it's probably not our job to cleanup the signals if our
tools are invoked in weird contexts, but at least we should make sure,
that the subprocesses we invoke and intend to control work as intended.

Also see:

http://lists.freedesktop.org/archives/systemd-devel/2014-August/022460.html
util: make use of newly added reset_signal_mask() call wherever appropriate
sd-journal: never log anything by default from a library
logind: add HandleLidSwitchDocked= option to logind.conf + documentation

https://bugs.freedesktop.org/show_bug.cgi?id=82485