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
Merge pull request #19 from rogpeppe/007-toplevel

charmstore: refactor external interface