Merge pull request #487 from deis/fix-yaml-bug

Fix YAML escape bug on Gunicorn log targets
Merge pull request #485 from deis/fix-logging-setup

Configure logging before modules that require it
feat(tags): add registry-to-registry transfers

This new endpoint takes a source registry to pull from and imports the specified
repository to the current registry. This follows the same syntax as how the docker client
pulls repositories.

In PaaSLand (both public and private), users want to run their images which are stored
from their own registries or from DockerHub. Specifically for [Deis](http://deis.io), we
need a way to be able to pull images from their registry (or DockerHub) over to our
in-house registry. We make the assumption that every user has access to their own
registry, so we can't tie down to mirroring from a single remote. The only way we see
that we can in the current implementation is to:

1. run a docker client
2. pull the image from the client's registry
3. push the image to the PaaS' in-house registry (after doing some last-mile layer
   configuration)
4. pull it down from the host that will be running the application.

This is too slow for our needs and is very inefficient (pull, push, then pull again).
We'd like to have some way that we can import an image directly from a remote registry.
This would reduce the processing time significantly.

This commit introduces a new endpoint for the in-house registry:

    POST /v1/repositories/<namespace:repository>/tags 'src=example.com:5000/busybox'

This endpoint will pull the repository and all corresponding tags that come with it from
the remote registry and store it locally. If the repository already exists, then it will
pull any layers missing from the remote and update the tag metadata to point to the new
image IDs. This behavior is equivalent to how `docker pull` works.
add debug logs
mimic docker client's repository name resolution
check if we already have the image cached
Revert "check if we already have the image cached"

This reverts commit 5cae5eb8d9ce2dfd9c9a1aa40d5c57fca30d5f3b.
add tag tests
Revert "add tag tests"

This reverts commit 5e1d327b19da2d02c53aee10e3023558e47238bc.
mock up public index

The public index has differing responses than an in-house registry. Ensuring that we are
importing the right data from the public index is important or else we may end up with
improperly formatted metadata for an image.
add debug log for tags
fix list generation
fix shortname issue

images on the public index have their short name displayed under
/tags and /tags/<tag>, which an in-house registry has no idea how
to parse the data.
import from src_index if not from public index