CDK-761: Fix inferred schema data samples.

This truncates values to 50 characters and removes all but a white list
of printable characters. Unicode characters will be replaced with '.' in
sample data for compatibility with the Hive MetaStore.
CDK-787: Fix Hive backward-compatibility check.

For backward-compatibility with pre-namespaces datasets, Hive dataset
creation checked whether or not a new dataset was replacing an existing
one in the default namespace. If it is, then the schema for the new
dataset is validated to ensure it can read existing data.

The problem was that this check used resolveNamespace, which returns the
default namespace as a match if either the location is null or the
location matches. But the location is almost always null, so this
prevented any table from being created when there is a duplicate name in
the default db. The fix is to consider only new tables that point to a
location matching the existing default table to match for this
validation.
CDK-735: Fix Crunch dataset writes with provided partitioners.

This updates DatasetKeyOutputFormat so that the view constraints are
used when writing to temporary datasets. That ensures that the values
provided by the target view are present so writes to the temporary
datasets don't fail. Fix and test contributed by Ryan Brush.

This also updates the partitioning methods in CrunchDatasets to fix the
CLI copy command when writing to a provided partition. In that case, the
mapper, GetStorageKey, needs the view constraints as well as the
partition strategy in order to create storage keys. The constraints are
serialized using the query map as a stand-in.
CDK-802: Fix Nullable annotation with AllowNulls.

This copies the fix for AVRO-1604 into Kite's AllowNulls. The method has
been renamed to avoid confusion with the static method makeNullable in
ReflectData.
CDK-803 Add ability to register custom extension functions with xquery and xslt morphline commands
CDK-803 Docs: Add ability to register custom extension functions with xquery and xslt morphline commands
CDK-803 Docs: Add ability to register custom extension functions with xquery and xslt morphline commands
cleanup indentation
mini cleanup
Merge pull request #272 from rdblue/CDK-802-backport-AVRO-1604

CDK-802: Fix Nullable annotation with AllowNulls.
add comment
CDK-797: Add CSV field ordering based on header.

This will create records using the field names defined in the CSV
header, if present. It also removes the unused option to turn on this
feature because fields should always be ordered by header if it is
present. To turn off header-based ordering, users can set the CSV
properties to use no header and skip the header line if it is present.
CDK-443: Add --required option to csv-schema command.

This adds an option to the csv-schema command that marks a field as
required. Schema inference will still check whether there are nulls
found in the field and will complain if they are found. If there aren't
null values, then the result schema will not add the type in a union
with null.

Schema inference was updated to check a set of required names and also
to handle the empty string differently. If the type is string, then the
empty string is a valid value and shouldn't be considered null. For
numeric types, the empty string can't be coerced to a value and should be
considered null. This is a slight change to inference, but doesn't
affect the behavior of csv-schema because all types were considered
nullable without the new option.
CDK-443: Fix refactor header field handling.

This refactors the header field handling to avoid multiple calls to
trim() and duplicate validation checks.
CDK-443: Fix IOException handling in CSV inference tests.
CDK-799: Add support for escaped CSV settings.

This generalizes the support for escaped characters, like \t. It uses
unescapeJava to decode the quote, delimiter, and escape characters
passed into the builder (which is used by the CLI commands).

Once CDK-259 is merged and we update guava, we should use the guava
escape support.