[Client] Fix possible goroutine leak in push.

The same as 5a804ac05bc3facd61953908da99310a257727a1
Merge pull request #770 from noxiouz/fix_leak_in_push

[Client] Fix possible goroutine leak in push.
Move notifications to dt
Merge pull request #773 from docker/test-drone

Move notifications to dt
Refactor layerReader into fileReader

This change separates out the remote file reader functionality from layer
reprsentation data. More importantly, issues with seeking have been fixed and
thoroughly tested.
Update error declarations and add missing test

This updates API error codes to coincide with changes to the proposal. Mostly,
redundant error codes were merged and missing ones were added. The set in the
main errors.go file will flow back into the specification.

A test case has been added to ensure ErrorCodeUnknown is included in marshaled
json.
Initial implementation of Layer API

The http API has its first set of endpoints to implement the core aspects of
fetching and uploading layers. Uploads can be started and completed in a single
chunk and the content can be fetched via tarsum. Most proposed error conditions
should be represented but edge cases likely remain.

In this version, note that the layers are still called layers, even though the
routes are pointing to blobs. This will change with backend refactoring over
the next few weeks.

The unit tests are a bit of a shamble but these need to be carefully written
along with the core specification process. As the the client-server interaction
solidifies, we can port this into a verification suite for registry providers.
Merge pull request #769 from stevvooe/layer-http-api

Initial implementation of Layer API