cleanup: use libdm's dm_sysfs_dir() for sysfs directory throughout

And remove superfluous cmd->sysfs_dir and
set_sysfs_dir_path/sysfs_dir_path fn from lvm-globals.[ch].
refactor: move lib/filters/device-types.h -> lib/device/device-types.h
refactor: move lib/device/device.c -> lib/device/dev-type.c
refactor: make device type recognition code common for general use

Changes:

- move device type registration out of "type filter" (filter.c)
to a separate and new dev-type.[ch] for common use throughout the code

- the structure for keeping the major numbers detected for available
device types and available partitioning available is stored in
"dev_types" structure now

- move common partitioning detection code to dev-type.[ch] as well
together with other device-related functions bound to dev_types
(see dev-type.h for the interface)

The dev-type interface contains all common functions used to detect
subsystems/device types, signature/superblock recognition code,
type-specific device properties and other common device properties
(bound to dev_types), including partitioning support.

- add dev_types instance to cmd context as cmd->dev_types for common use

- use cmd->dev_types throughout as a central point for providing
information about device types
dev-type: dev_get_primary_dev fn: use dev_types and provide better return codes

The dev_get_primary_dev fn now returns:

  0 if the dev is already a primary dev
  1 if the dev is a partition, primary dev is returned in "result" (output arg)
  -1 on error

This way, we can better differentiate between the error state
and the state in which the dev supplied is not a partition
in the caller (this was same return value before).

Also, if we already have information about the device type,
we can check its major number against the list of known device
types (cmd->dev_types) directly, so we don't need to go through
the sysfs - we only check the major:minor pair which is a bit
more straightforward and faster. If the dev_types does not have
any info about this device type, the code just fallbacks to
the original sysfs interface to get the partition info.
filter-mpath: detect partitions of mpath components

We use mpath filtering (enabled by devices/multipath_component_detection=1
lvm.conf setting) to avoid a situation in which we could end up with
duplicate PVs found. We need to filter out the mpath components and
use only the top-level multipath mapping instead for PV scans.

However, if the there are partitions on multipath components, we need
to filter out these partitions. This patch fixes it so those
partitions found on multipath components are filtered as well.

For example, let's consider following configuration:
The sda and sdb are mpath components, sda1 and sdb1 the partitions
on these components, mpath-test the mpath mapping and mpath-test1
the partition mapping - created automatically by kpartx right
after mpath-test creation. The PV resides on top.

       (LVM PV)
          |
      mpath-test1
          |
      mpath-test
          |
sda1 ---------- sdb1
   \ |        |/
    sda      sdb

E.g. for sda1 and sdb1, the code will detect this and it skips
the partition that belongs to the multipath component:
  <snippet from the log>
    #filters/filter-mpath.c:156         /dev/sda1: Device is a partition, using primary device /dev/sda for mpath component detection
    130 #ioctl/libdm-iface.c:1724         dm status   (253:2) OF[16384](*1)
    131 #filters/filter-mpath.c:196         /dev/sda1: Skipping mpath component device
  </snippet from the log>

Othewise, we'd see the same PV label on sda1/sdb1 and mpath-test1
at the same time ending up with "Duplicate PV found...".
cleanup: remove old and unused code to detect partition types

This part of the code has not been used for ages, if ever.
If needed anytime in future, we should use some library
instead - libblkid?
distclean: add missing items

These were missing in distclean target under scripts dir:
  blk_availability_init_red_hat
  blk_availability_systemd_red_hat.service
  blkdeactivate.sh
dev-type: refine dev_get_primary_dev return codes and add more comments
thin: vgsplit support for thins

Support vgsplit for VGs with thin pools and thin volumes.
In case the thin data and thin metadata volumes are moved to a new VG,
move there also all related thin volumes and check that external origins
are also present in this new VG.
cleanup: tab
tests: harness updates
man: refine lvm.conf and man page documentation for autoactivation feature
typo: lvm.conf: auto_activation_list -> auto_activation_volume_list
conf: refine lvm.conf documentation for autoactivation feature even more
report: revert lvs origin_size sort order change

Reinstate the previous sort order for origin_size, so that LVs with
an empty origin_size continue to appear at the start of the list
not the end.

Ref. 9d445f371c7658969d6580748233dc33c3ba0453
text: miscellaneous comments & message tweaks
lvmetad: add some message for error path

Do not leave replay uninitialized for internal error.
mirror: add missing error message

When a user has not proceeded with conversion,
print the error message why the command has failed.
config: skip close of stdin

If the used stream has been stdout, do not close it.