SliceToPath explodes a slice name to its corresponding path in the cgroup
hierarchy. For example, a slice named "foo-bar-baz.slice" corresponds to the
path "foo.slice/foo-bar.slice/foo-bar-baz.slice". See systemd.slice(5)
Since SliceToPath needs to do escapings and sanity checks, several
functions used in systemd for that purpose are also ported.