Consolidate routes and error codes into v2 package

This PR takes the route definitions and the errors package and merges them into a single, one-stop-shop v2 package. This package provides all the trappings that may be required to implement a compliant server or client.

The goal is to integrate this as part of the docker core v2 client.
Are there any query values we should be passing into this call for generating the new URL?