ct: enter into a mount namespace after entering into other namespaces

mnt_ns must be the last one. After switching in a mount namespace,
the old /proc becomes inaccessible and we are not able switch other
namespaces

Signed-off-by: Andrey Vagin <avagin@openvz.org>
ct: don't close a file descriptor if it's equal to the required one

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libct: add ability to use one library with OpenVZ and upstream kernels

Alex, could you test it on the OpenVZ kernel

Signed-off-by: Andrey Vagin <avagin@openvz.org>