Move tag tests to the new collection API.
Use the new ReferenceCollection in the reference tests.
Repository#ref and Repository#refs now use the ReferenceCollection.
Fix a typo.
All tests and internal code now use the collections API.