dockerinit: console FD passing

Move all the pty/pipe console handling into dockerinit.  Use the rpcfd
package to pass the console FDs to the docker daemon.

This will allow us to get rid of the container Ghost state, since the
docker daemon can always reconnect to the container's console if needed.
It will also enable stdin/stdout/stderr separation when using
libvirt-lxc.
dockerinit: unmount socket directory
dockerinit: goodbye Ghost state

Now that we can always reconnect to dockerinit to connect to the console
and wait for the exit code, the Ghost state can go bye bye.
dockerinit: machine container support

Detect when the app is a "machine container" with its own init process.
In this case, since upstart and systemd require running as PID 1, the
original dockerinit will have to "fork" a child long-running dockerinit
before exec-ing the real init.
remove pid from container state

Don't store the pid since nobody is using it.
container: make Start asynchronous again

Remove the code in Start that makes sure the container is really running
before returning.  It's quite hackish and unnecessary.  With the
dockerinit code and the rpc/pty locks there should hopefully not be any
race conditions in the start path.
test: get rid of LXC-specific tests

Since we're moving to a container plugin infrastructure, these tests
don't currently work with the LXC plugin and they'll never work with the
libvirt plugin.
test: make TestEnv non lxc-specific
lxc: create lxc container plugin

Create a container plugin infrastructure and move the lxc-specific code
to its own plugin.
network: create dockernet plugin

Create a network plugin infrastructure and move the bridge creation code
to a new "dockernet" plugin.
dockerinit: privileged device cgroup access

When using libvirt-lxc in privileged mode, enable cgroup device access
from dockerinit, since libvirt doesn't support it.
libvirt: create libvirt-lxc plugins

Create container and network plugins for libvirt-lxc.  If libvirtd is
running, use the libvirt plugins.  Otherwise use the dockernet and lxc
plugins.

With this change, docker must be dynamically linked since libvirt
doesn't seem to support being statically linked, based on the compile
errors seen.
workaround for libvirt /.oldroot directory leak
workaround for upstream libvirt bug (error on > 60 chars)

This is a temporary fix for
https://bugzilla.redhat.com/show_bug.cgi?id=1033369
dind: fix cpuacct,cpu workaround for libvirt

When running the dind script in a libvirt container, it shows the
following error:

  ln: failed to create symbolic link `/sys/fs/cgroup/cpu,cpuacct/cpuacct,cpu': Operation not permitted

The libvirt-lxc already creates the cpu,cpuacct cgroup directory, so
check for its existence before trying the symlink.