Add support for .dockerignore

Implementation is a bit more elaborate than docker's implementation and matches with the one proposed in https://github.com/dotcloud/docker/pull/6869 to handle permission issues when running e.g. a mysql container next to a local container.

I'm getting test failures locally so I haven't looked at writing a proper test yet.