CDK-139: Adding changable providers to repo tests.

Adding test of FS provider and FS repo. This is in preparation for
testing the FS repo with the Hive external provider.

Caught and fixed problems:
* When validating the DatasetDescriptor, equals was not implemented
* FS repo delete should return true if the provider delete returns true
CDK-123: Clarifying assumptions in Hive Provider.

The FileSystem is now final and set in the constructors. Before, a call to save
assumed that the FileSystem was set if a dataDirectory was set, which happens
when an unmanaged HCatalogDatasetRepository creates (external) data sets.
Changes to the HCatalogDatasetRepository could easily cause a NPE by violating
these undocumented assumptions, so always setting up a FileSystem prevents
that. Also, nothing set the dataDirectory to null, so table locations weren't
read on subsequent saves.

In addition, this commit makes save more defensive. Rather than relying on
dataDirectory being null to signal that save should read the managed table's
location, it now handles both modes explicitly. In managed mode, the table is
created, read, and then dataDirectory is set (it is an outgoing field). In
unmanaged mode, the dataDirectory (an incoming field) is checked with a
Precondition at the start of the function, used to create the table metadata,
then set to null so that it doesn't leak into other save calls.
CDK-123: Refactoring Hive repository for clarity.

Previously, both create and get would lazily create a special inline
FileSystemDatasetRepository for the purpose of opening Hive-managed Datasets
because the location of the those sets is controlled by Hive. This commit
consolidates those inline classes into a private inner class called
ExternalFileSystemDatasetRepository with docs to explain what's going on: it is
only used immediately after the MetadataProvider creates or loads because it
will only load the data set that the MP points to.

The special data set repo was previously stored in the same field as the normal
repo, used when Hive does _not_ manage the data set, which was confusing so it
is now stored in a new field: externalDatasetRepository. Both fields (the other
is fileSystemDatasetRepository) are final and initialized in the constructors.

Next, the Hive repository used to assume that all tables were in the
filesystem-backed repository that is opened in unmanaged mode (now null in
managed mode). This isn't necessarily the case, so the special external
repository is now used when loading and deleting for both modes because its
location is set from the Hive metadata when the set is loaded. An extra
consequence is that the DatsetDescriptor must be successfully loaded before it
can be deleted. With this change, the regular FS repository is only used for
creation.

This commit also removes the call to set the MetadataProvider's file system in
create. The FileSystem for the HCatalogMetadataProvider is now set in the
constructors for unmanaged mode, from the created FileSystemDatasetRepository
or from the FileSystem passed in. For managed mode, the handling has not
changed.

Known bug: in create, the FS repository determines the location of the data set
in create and calls metadataProvider.save. But the path where the data will be
stored must be set before calling save (or else the Precondition is not met).
This currently gets around the problem by guessing (accurately) where the FS
repository will put the data set, violating encapsulation.
CDK-123: Merging Hive branch, updating for CDK-139.

CDK-139 adds a location to DatasetDescriptor, which is what CDK-123
needed in order to stop passing Dataset locations through a field on the
MetadataProvider instance, which created a brittle dependence between
the Hive MetadataProvider and DatasetRepository. Also, because the
FileSystemDatasetRepository no longer determines dataset location, and
instead uses whatever is set in the DatasetDescriptor, it can be used
without modification for external Datasets. For managed Datasets, the
HCatalogDatasetRepository is now a thin wrapper around the FS
DatasetRepository that avoids creating and deleting---handled by
Hive---but delegates to FS to load and do other tasks.

The other major change in this commit is to split the
HCatalogMetadataProvider into two implementations, one for external
(HCatalogExternalMetadataProvider) and one for managed datasets
(HCatalogManagedMetadataProvider). The shared methods still exist in
HCatalogMetadataProvider, from which both inherit. This is easier to
reason about than selecting behavior with a boolean field because they
need to do certain operations in different orders (create) and should
handle certain situations differently. Utility methods for CDK-Hive
translation are now in HiveUtils and have been extended for incoming
Parquet support.

The new MetadataProviders are working and passing standard tests with FS
repositories. This caught a bug where just setting the TableType to
EXTERNAL does not create an external table; a table parameter, EXTERNAL,
must be set to TRUE.

To do:
* Translate directly between Hive and CDK partitioning and add tests
* Add round-trip tests, via core's TestDatasetRepositories
CDK-139: Updating Crunch tests for FS repo changes.