Added basic tests for CKAN.Repo

This involves a change to CKAN.Repo's internals so that it can
populate a registry without needing to save it.