pvscan: Use lvmetad_used().

Config variables that are processed during setup prior to calling into
particular tools must not be accessed directly afterwards in case the
values already got overridden.

_process_config() already used the tests I'm removing here to call
lvmetad_set_active() and set up lvmetad_used().
reports: Use X for unknown LV attr when no dm.

It's safer not to tell people an LV is inactive when we aren't sure.
metadata: Fix unlock on VG recovery error path.

If lock conversion failed it tried to unlock VG that was no longer locked.
tools: Add --readonly support.

Offer lock-free access to display virtual machine or clustered VG metadata
while it might be in use.
unknown: fix mempool used for name allocation

Use cmd libmem mempool for name allocation, since mem mempool
is released after each clvmd command.
thin: dmeventd plugins support more minors

Kernel supports upto 1M (20bit) minors.
TODO: convert to hash to reduce memory requirements
asprintf: fix test for error result

On error this function returns -1. Since the functions however
do not propagate error upward, it's rather cleanup change.
dmeventd: check for list size within lock

Move check for _thread_registry list size behind mutex.
Use alloca() instead of buffer[count] (they are the same anyway)
devmapper-event: always initialize timeout

Before calling select, always set all struct members of timeout.
makefiles: wait till include is populated

Since libdaemon needs configure.h header, wait forl links.
makefiles: clear targets in with make clean

Make clean usually cleans all compiled files.
Make distclean cleans configure generated files
makefiles: compile files on make

Make install should install already compiled/generated files.
makefiles: drop linking of deamon libs to plugins

Daemon lib is linked into lvm2cmd library.
makefiles: move subdir into same section

Just shift few lines
libdaemon: header cleanup

Ensure  daemon-io.h is used as a generic header included
with configure defines before other headers.
(In future all lvm2 libraries should settle on a single lib.h header)
Rename couple defines to better match header file names.
cleanup: include stdarg.h where needed.

Avoid dependency on implicit inclusion of stdarg.h with
libdevmapper.h.
cleanup: reduce inclusion of unnecessary headers

Remove those file which are not needed by .c files
or already include because the headers already needs them.
cleanup: drop inclusion of devmap - merge
cleanup: set _REENTRANT in header

Use same way of setting _REENTRANT as in other
files - set it in the first included header file
(clvmd-common.h)
cleanup: skip zeroing of cleared areas

Zalloc mem is already zeroed.