all: use charm.v3

Change to use charm.Reference throughout.
charmstore/router: generate http.StatusNotFound appropriately
add params/error.go
more error masking; more error tests; more comments
update dependencies.tsv
update dependencies.tsv for new charm.v3 version
Merge pull request #49 from rogpeppe/020-use-charm.v3

all: use charm.v3

Change to use charm.Reference throughout.

dependencies.tsv not changed because charm.v3 has not yet landed, so
we don't have the commit ref.
Merge branch 'v4' into 021-http-status

Conflicts:
	internal/router/router.go
	internal/router/router_test.go
	internal/v4/api.go
rename charm.URL to charm.Reference after merge
fix typo
Merge pull request #50 from rogpeppe/021-http-status

charmstore/router: generate http.StatusNotFound appropriately

This generates messages (and error codes) as expected by the API specification.
internal/charmstore: copy stats logic from _old and update
sortimports
internal/v4: update for NewStore error return
Merge pull request #51 from rogpeppe/022-store-stats

internal/charmstore: copy stats logic from _old

Please note that almost all the code and tests in this PR are already reviewed
and battle-tested.
internal/charmstore: make stats counter tests less hacky.

internal/charmstore: move mongojs condition into storetesting.

internal/router: universal ParseForm.

internal/router: strip prefix from global handlers

internal/router: add ServeMux, NotFoundHandler
internal/v4: implement serveArchive
add comments for review
Implement archive size API (metaArchiveSize).
Add a size sanity check.