add various escaping/path handling utility functions

A portion of systemd commit 4fe88d28a4cfa504c1f2362d4a7030fae4c4af29 , needed to
support changes made by commit 6284c1ca41dca85e968e8d304cdc154c5a46d6d2

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
add various escaping/path handling utility functions

This is a partial combination of two systemd commits:

5926cccae202f1b8869017d4bdaf9e9ce371bba6
4fe88d28a4cfa504c1f2362d4a7030fae4c4af29

...and provides functions needed for the changes that were added
in commit 6284c1ca41dca85e968e8d304cdc154c5a46d6d2

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
add new hexchar() call

Based on systemd commit fb624d04e56018defe297eff1d88888b192caeaa , added
to support commit f8e6d758cd65b28f94b62344bd95e7bab94370d4

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>