shared/utf8: merge implementations, remove cruft

This unifies the utf8 handling code which was previously duplicated in
udev and systemd.
device-nodes: move device node specific code to own file

In the process, rename udev_encode_string which is poorly named for what
it does. It deals specifically with encoding names that udev creates and
has its own rules: utf8 is valid but some ascii is not (e.g. path
separators), and everything else is simply escaped. Rename it to
encode_devnode_name.
test-utf8: add more tests for public functions