pvcreate: fix ignored --dataalignment/dataalignment offset for pvcreate --restorefile

There were two bugs before when using pvcreate --restorefile together
with data alignment and its offset specified:

  - the --dataalignment was always ignored due to missing braces in the
    code when validating the divisibility of supplied --dataalignment
    argument with pe_start which we're just restoring:

	if (pp->rp.pe_start % pp->data_alignment)
		log_warn("WARNING: Ignoring data alignment %" PRIu64
			 " incompatible with --restorefile value (%"
			 PRIu64").", pp->data_alignment, pp->rp.pe_start);
        pp->data_alignment = 0

    The pp->data_alignment should be zeroed only if the pe_start is not
    divisible with data_alignment.

  - the check for compatibility of restored pe_start was incorrect too
    since it did not properly count with the dataalignmentoffset that
    could be supplied together with dataalignment

The proper formula is:

  X * dataalignment + dataalignmentoffset == pe_start

So it should be:

  if ((pp->rp.pe_start % pp->data_alignment) != pp->data_alignment_offset) {
	...ignore supplied dataalignment and dataalignment offset...
  }
tests: add separate test file for bootloader area support and enhance tests

Enahnce bootloader area test to check whether restoring values from
backup works correctly.
tests: add test for pvcreate --dataalignment --dataalignmentoffset --restorefile compatibility

Also, avoid division by zero in the pvcreate's param validation
in case someone supplies "pvcreate --dataalignment 0".
pre-release
post-release
alloc: Refactor area reservation code.

No functional changes intended to be included in this patch.
polldaemon: ret invalid cmd for negative interval

Negative intervals are not supported.
pvmove: remove locked flag from error pvmove0

When pvmove0 is finished, it replaces temporarily pvmove0
with error segment, however in this case, pvmove0 remains
unremovable in case pvmove --abort is interrupted in this
moment - since it's not a pvmove anymore and normal
lvremove can't be used to remove LOCKED lv.
memlock: ignore more libraries

Extend the list of ignored libraries. Since we do not
use those libraries during suspend, skip their locking.
clvmd: fix test mode race

When TEST_MODE flag is passed around the cluster,
it's been use in thread unprotected way, so it may have
influenced behaviour of other running parallel lvm commands
(activation/deactivation/suspend/resume).

Fix it by set/query function only under lvm mutex.
For hold_un/lock function calls check lock_flags bits directly.
clvmd: move mutex init and detroy

Move the pthread mutex and condition creation and destroy
to correct place right after client memory is allocatedd
or is going to be released.

In the original place it's been in race with lvm thread
which could have still unlock mutex while it's been already
destroyed.
clvmd: set finished flag with mutex

Setting this variable needs to be protected with mutex.
clvmd: drop reply_mutex

Added complexity with extra reply mutex is not worth the troubles.
The only place which may slightly benefit from this mutex is timeout
and since this is rather error case - let's convert it to
localsock.mutex and keep it simple.
clvmd: improve mutex usage in request_timed_out

Use mutex to access localsock values, so check
num_replies when the thread is not yet finished.

Check for threadid prior the mutex taking
(though this check is probably not really needed)
clvmd: skip adding reply when finished

Prior adding new reply to the list, check
if the reply thread is not already finished.
In that case discard adding message
(which would otherwise be leaked).
clvmd: use thread-safe ctime_r when debugging

Use thread friendly version of ctime
TODO:should be probably replaced with strftime()
cleanup: clvmd reindent local_pipe_callback

Move !node_up check in front and reindent
rest of the function to the left.
cleanup: clvmd drop unused enum state
cleanup: corrent indent level
tests: implement lv_attr_bit

Add easy check function for cheking lv_attr bits