libudev: set errno when udev_device_new_from_* or udev_device_get_parent_* fail

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Fix misuse of uint64_t as size_t

They have different size on 32 bit, so they are really not interchangable.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Reject invalid quoted strings

String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.

Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.

_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.

Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.

mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS  $RootDir $MountPoint
mbiebl_> which is pretty weird

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>