Add address metadata query functionality to libaddressinput.

Specifically the utility functions IsFieldRequired() and IsFieldUsed()
that answers the questions of whether a particular field is a required
field or a field that is used, respectively, for a particular region.

This is implemented through the class AddressValidator, which provides
the public interface, and the class MetadataQueryTask which encapsulates
the information necessary to perform the checking for an Is*() method
that answers a yes/no question and call a callback when that has been
done.

The interface is asynchronous, allowing it to be used with a Downloader
implementation that waits for several pending requests simultaneously.

By virtue of being part of the class AddressValidator, this shares the
metadata cache with address validation. (The future might show this to
be a not so good design decision, but with the actual implementation
isolated in class MetadataQueryTask it should be straightforward to move
things around then.)
7 files changed
tree: fd06d36f5c2419b76dca55c6d8ffed7e304d2e05
  1. cpp/
  2. externals/
  3. java/
  4. testdata/
  5. .gitmodules