use liblockdev if available, HYP-9919

Fall back to /var/lock if not available.

Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>
support device symlinks, HYP-9919

This is necessary for usage of /dev/serial/by-id or
/dev/serial/by-path type pathes.

Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>