Use custom http client middleware

This tries to handle the incorrect content type returned by the docker
api build endpoint.
Fix return value schema processing
Add utilities for constructing tar archives