Merge pull request #299 from avagin/api-linux

Prepare ground for moving on new API
libcontainer: move Config in a separate package

We are going to import the namespaces package into libcontainer,
so libcontainer should not be imported into namespaces.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libcontainer: move State in the configs package

We are going to import the namespaces package into libcontainer,
so libcontainer should not be imported into namespaces.

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

Signed-off-by: Andrey Vagin <avagin@openvz.org>
linux_container: fork an init process in a new set of namespaces

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libcontainer: optimize updateStateFile()

Signed-off-by: Andrey Vagin <avagin@openvz.org>
process: use io.Reader instead of io.WriteCloser for standard fds

Could someone explain why we should close this fds? Usually users
cares about closing them or not.
For example exec.Cmd declares them as io.Reader.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libcontinaer: use new API in integration tests

Signed-off-by: Andrey Vagin <avagin@openvz.org>
namespaces: combine Process.Env and Container.Env

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