Provide build tar stream for user

This does not handle the `X-Registry-Config` header yet.  I will submit a follow up pull request for that.

TODO:
- [x] add some tests
The file was not copied directly, but it was derived from Docker - Docker does client-side validations before sending the build context to the server, so it was necessary to duplicate those here.  Here are the approximate code sections from which this code was derived:

- [`.dockerignore` parsing](https://github.com/docker/docker/blob/339173dd5be7ec8807448f83622aa88561c445a6/api/client/commands.go#L142-L155)
- [context dir validation](https://github.com/docker/docker/blob/339173dd5be7ec8807448f83622aa88561c445a6/utils/utils.go#L489-L531)