libdm: track implicit dependecies

When the node enters dtree with implicit dependency, it
automatically has udev flags from parent node
and could not be changed later when the node has been
entered again via i.e lvm's preload tracking.

Resolve this by tracking whether the node has been
created by implicit dependency tracking or has been
entered explicitely. Implicit node could be later
upgraded by an explicit _add_dev() with proper udev_flags.

For implicit devices add special udev flags to avoid
any scan and udev rule processing if we resume such device.

Patch allows easier removing of orphan nodes.
libdm: always dm_lib_init mangling mode

If there ever would be a second call to dm_lib_init()
and envvar would be improperly set, some last set value
would be used while it should reset to default mangling mode.
libdm: fail if buffer for version is to short

Return fail error code, if supplied buffer is too small.
libdm: check for size when opening control node

Use dm_snprintf() to detect fail if open_control node would
not have fit into buffer.
libdm: check for _build_dev_path failure

Enhance internal function _build_dev_path for failure
if buffer would be too small.
Use memcpy instead printf for a single string.
libdm: simplify segtype search

For cache target use directly SEG_CACHE.
Hide dm_segtypes as internal static variable _dm_segtypes,
since noone is supposed to use it.
exec_cmd: skip fork when argv[0] is null

Skip whole fork code path if the arg would be null.
raid: use internal variables for array alloc

Don't use passed pointer when allocating policies' array.
(In case policy_argc would be NULL, this would have caused
NULL dereference).
log: skip repeated hashing when logging once

When a message is already found in the hash, no need to hash it again.
lvm-string: add cdata/cmeta as reserved name
man: cleanup new params

Correcting cachemode args
lvconvert: do not activate cache pool

Cache pool cannot be active alone.
debug: catch invalid request for tree

In general for non-toplevel LVs we shouldn't allow any _tree_action.
For now error on request for cache_pool activation which
doesn't even exist in dm-table.
cleanup: refactor apply_lvname_restrictions

Split apply_lvname_restrictions into 2 internal
function:

_lvname_has_reserved_prefix()
_lvname_has_reserved_string()
cleanup: use DM_ARRAY_SIZE

More use of libdevmapper macro
cleanup: do include lvm headers in libdm build

Relocate some defines from lvm headers to those
few shared between libdm and lib code.
cleanup: update comments

Fix cut&paste comments
cleanup: reindent return

Since the return here is the only path, reindent for readability.
cleanup: libdm drop already zeroed elements

Drop zeroing of zalloc-ed memory.
tests: check prohibited names