parse_{chkpnt,restore}_opt: don't print error twice

We don't have to print an error about invalid option,
as this is already done by getopt_long().

Before this patch it worked like this:

	# vzctl restore 9990 -x
	vzctl: invalid option -- 'x'
	Invalid option -?

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
parse*opt(): add/improve extra args check

In parse_opt(), check for extra arguments was printing to stdout,
and the message was somewhat cryptic ("Non-option ARGV arguments:").
Fix both issues, and move the code to a macro.

Also, use this macro from parse_chkpnt_opt(), parse_restore_opt()
and parse_startstop_opt() so that extra arguments will cause
an error now.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl start,restore: add --skip-remount

By default, if a container is already mounted, it is remounted
right before start (or restore). This is a good behavior because
since the last time the container was mounted something might have
changed (container parameters or mount scripts, for example).

In some cases, though, it makes sense to mount a container and
then start or restore it without remounting, so this option might
be handy.

Also
* document it in vzctl(8) and vzctl --help
* add the option to bash-completion script

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzmigrate: use ploop with feedback if possible

ploop copy added support for more effective copy procedure, when the
sending side waits for completion of fsync() on receiving side before
suspending a container. This feature requires a "feedback" channel
from the receiving side back to sending side, such as a bi-directional
pipe or a socket pair.

This commit implements such a channel using openssh port forwarding
(for security), socat tool (for listening on a tcp socket),
and built-in bash feature to connect a tcp socket to a file descriptor.

If support for feedback fd is not available remotely (older ploop tools
version), or it is not working for some other reason, vzmigrate
falls back to old style ploop copy.

Unfortunately, this commit also changes /bin/sh to /bin/bash shebang,
as a feature to redirect a tcp host:port to an fd is specific to bash.
socat could also be used here, but unfortunately there is no way
to get ploop copy status from it, so let's rely on bash for now.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzmigrate: ability to run verbose ploop copy

In case -vv is specified, run ploop -vvvv copy. This will print
ploop timings in case ploop is compiled with timings profiling
(see http://git.openvz.org/?p=ploop;a=commitdiff;h=9e4aa564fc40)

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzmigrate: add --flags to vzctl chkpnt call

vzctl chkpnt --flags option can be used to pass flags/caps of the
remote CPU (obtained by vzcptcheck tool) to the local kernel, so it
might use this knowledge to do something good. Whether or not the
current kernel uses that is questionable, but it might.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>