CDK-472: Add URIPattern#construct to create URIs for patterns.

The URIPattern#construct method takes a map of match data, like what is
produced by URIPattern#match, and produces a URI object that matches the
pattern. This supports constructing URIs that are known to match
patterns without knowing the pattern details. For example, constructing
a dataset URI from a dataset name and a repository URI depends on how
the URI pattern handles the dataset name. For some patterns, it is added
to the path, but some add the name as a query argument. This supports
both cases.
CDK-472: Add Registration support to look up dataset patterns.

This also adds a method to construct a dataset URI from a repo URI and a
dataset name. It should be moved to a URI builder class.
CDK-472: Fix NPE bugs in URIPattern