Use docker client lib instead of binary for pulls
Add how to install deps
Add ResolveRepositoryName and validateRepositoryName

This was copied from github.com/dotcloud/docker@4a3b36f44309ff8e650be2cff74f3ec436353298
to avoid pulling in complete Docker source as dependency.