restore: set up a handler for collecting signals from zombies (v2)

All pending signals are restored by another code.

In this moment all crtools VMA-s are unmapped, so we need to have
own sa_restorer.

Alexander, could you help me with ARM? I found in glibc sources, that
sa_restoer should look like this:

ports/sysdeps/unix/sysv/linux/arm/sigrestorer.S
....
ENTRY(__cr_restore_rt)
        CFI
        mov     r7, $SYS_ify(rt_sigreturn)
        swi     0x0
        .fnend
END(__cr_restore_rt)

v2: Move architecture-dependent code in the proper place

Cc: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
restore: collect signals from zombies (v2)

Each zombie sends SIGCHLD to parent. crtools restores all pending
signals, so all other signals should be collected.

Here is a problems, that signals SIGCHLD can be merged, but crtools
should be sure, that all signals are collected.

For that a zombie locks a global zombie_lock, which is released by
parent.

This operation should be done between CR_STATE_RESTORE and
CR_STATE_RESTORE_SIGCHLD. Two new states CR_STATE_RESTORE_ZOMBIES
and CR_STATE_RESTORE_PREP_ZOMBIES were added.

CR_STATE_RESTORE_PREP_ZOMBIES is used for waiting when all tasks
installes a special sighandler.

CR_STATE_RESTORE_ZOMBIES is used for waiting all zombies.

v2: clean up
v3: rework synchronization

Signed-off-by: Andrey Vagin <avagin@openvz.org>
zdtm.sh: add static/sigpending in the default set

Signed-off-by: Andrey Vagin <avagin@openvz.org>
arm: added the descriptions of the syscalls pread64, rt_sigqueueinfo, signalfd4, rt_tgsigqueueinfo

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
arm: added architecture-specific implementation of __cr_restore_rt

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>