Refactor common repo implementation in HCatalog.

This introduces HCatalogAbstractDatasetRepository, which handles all
common implementation between managed and external implementations, like
HCatalogMetadataProvider.