charmstore: refactor external interface

We lose the version registration logic, and make versions
available to external packages without exposing
internal implementation details in the godoc.
add doc comments
charmstore: fix doc comment for review
Merge branch 'v4' of https://github.com/juju/charmstore into 007-toplevel

Conflicts:
	server_test.go
Merge pull request #21 from rogpeppe/007-toplevel

charmstore: refactor external interface