Remove whitespace around args

Fixes #8343
service: test properly whether systemd is running

Use a pure Python reimplementation of the [sd_booted(3)][1] function
from [systemd v210][2].

[1]: http://www.freedesktop.org/software/systemd/man/sd_booted.html
[2]: http://cgit.freedesktop.org/systemd/systemd-stable/tree/src/libsystemd/sd-daemon/sd-daemon.c?id=v210#n465