Add support for .dockerignore

Fixes #2224 

This improves the archive package's API and reads a ``.dockerignore`` file as a list of paths to exclude while building the context.