internal/v4: export Handler
rename NewHTTPHandler->NewAPIHandler, NewAPIHandler->NewAPIHandlerFunc
Merge pull request #96 from rogpeppe/040-v4-export-handler

internal/v4: export Handler

When implementing the legacy API we want access to parts of the v4 implementation
and this provides that.
internal/legacy: new package
fix tests
internal/router, internal/legacy: use TrimPrefix
Merge pull request #97 from rogpeppe/041-legacy-api

internal/legacy: new package

We add a stub server for the legacy API. It has a version of "" because
the legacy API was not versioned. Currently all endpoints remain
unimplemented.
internal/legacy: implement /charm endpoint
Merge pull request #98 from rogpeppe/042-legacy-charm

internal/legacy: implement /charm endpoint

We use some of the tests from the old server.
internal/legacy: implement charm-info endpoint
add copyright notice
Merge pull request #100 from rogpeppe/043-legacy-charm-info

internal/legacy: implement charm-info endpoint

This requires the SHA256 hash of the content. Rather than clutter the other code,
we calculate this lazily on demand.