charm: refactor URL vs Reference

This is a breaking change so move package path to charm.v3.
charm: add bson marshaling for Reference, and extra tests
Merge pull request #31 from rogpeppe/008-refactor-reference

charm: refactor URL vs Reference