network: remove unnecessary links iptables rule for return traffic

Currently there are two iptables rules per port for each link: one to
allow the parent to connect to the child's port, and another one to
allow return traffic from the child back to the parent.  The second rule
shouldn't be needed because the "ctstate RELATED,ESTABLISHED" rule can
already allow all established traffic.

So this patch does the following:

1. Move the RELATED,ESTABLISHED rule to be _before_ the potential
   inter-container communication DROP rule so it will work for
   inter-container traffic as well.  Since we're inserting, everything
   is reversed chronologically so it should be inserted _after_ we
   insert the DROP.  This also has a small performance benefit because
   it will be processed earlier and it's generally one of the most
   commonly used rules.

2. Get rid of the unnecessary return traffic rule per link.

3. Also move the other "Accept all non-intercontainer outgoing packets"
   rule to earlier.  This gives a small performance benefit since it's
   also a commonly used rule, and it makes sense to logically group it
   next to the ctstate rule.

Docker-DCO-1.1-Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> (github: jpoimboe)
Fix for #3674 Can't `rm` containers when disk full

Rather than creating a new directory and moving it there before
deleting that new directory, just move the directory we intend to
delete.

In the old way, the Mkdirall could fail, which meant that you
couldn't delete containers when the disk was full.

Tested.

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
Add Peter Waller <p@pwaller.net> to AUTHORS

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
Merge pull request #3798 from vieux/3777_fix

fix mflag import
Update Dockerfile to be based on 13.10 instead of 12.04 so that we can remove our s3cmd backports need, and so we can have the new linux-libc-dev dependency we need for compiling the btrfs driver without nasty APT hackery

In addition, we've now hard-coded LXC version 0.8 compiled from source so that we can have the most stable dev environment possible.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Merge pull request #3796 from tianon/dockerfile-btrfs

Update Dockerfile to be based on 13.10 instead of 12.04, add linux-libc-dev dep, remove s3cmd backports nonsense
Merge pull request #3789 from pwaller/issue-3674

Fix for #3674 Can't `rm` containers when disk full
Fix unclear error message when deleting container

I was getting the following error:

```
$ bundles/0.7.6-dev/binary/docker-0.7.6-dev run -rm -v=/var/run:/foo base echo hi
hi
2014/01/28 14:24:46 Error: container_delete: No such id: run
```

This commit makes the true origin of the error clearer. Issue #3806 is
tracking the cause of the error.

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
exexdriver: Make Command.GetExitCode an internal call

This code only works for backends that directly spawn the child
via the Command. It will not work for the libvirt backend. So
we move this code into the individual backends that need it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Merge pull request #3805 from alexlarsson/execdriver-drop-getexitcode

exexdriver: Make Command.GetExitCode an internal call
Merge pull request #3807 from pwaller/fix-unclear-error

Fix unclear error message when deleting container
Merge pull request #3759 from jpoimboe/links-iptables-cleanup

network: remove unnecessary links iptables rule for return traffic
Remove api_params.go

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
job.error\* now return engine.StatusErr

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
add setSubEnv and getSubEnv

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)