Add support for TSUID queries to Query and TsdbQuery. It is fully backwards
compatible. If a list of tsuids is provided, the metric/tags are ignored.
Otherwise the query behaves as usual. A row key regex is built to return only
the rows matching the TSUID. All TSUIDs in the list must share the same metric
and their data will be aggregated together.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify TSSubQuery to use a generic List for TSUIDs
Modify TSQuery to supply the list of TSUIDs to a TsdbQuery if given

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Update QueryRpc to accept TSUID queries

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify UniqueId to fetch names and suggestions asynchronously.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add MockBase.java, a mock implementation of HBase used for unit testing.
It uses nested hash tables to store keys as hex encoding strings with
byte arrays as the value. It does not currently support timestamps or
multiple versions. The asyncbase client is mocked with the following:
GetRequest
DeleteRequest
PutRequest
CompareAndSet
Scanner (limited to row regex and always returns the entire result in
  the first call)
AtomicIncrementRequest

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify all storage calls in TSMeta and UIDMeta to be asynchronous along with
all unit tests and callers
Update TSDB.getUidName() to use the asynchronous name call
Modify UniqueIdRpc to access TSMeta and UIDMeta asynchronously, though the RPCs
could still be asynced when responding to the client.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add tree building classes including:
Branch - A list of leaves and child branches in a tree
Leaf - Represents a single timeseries in the tree
Tree - Container with meta data for trees
TreeBuilder - Logic for compiling a tree from TSMeta objects
TreeRule - A single rule in the tree definition, determines how timeseries
are organized in the tree
Add TreeRuleTypeDeserializer JSON helper class for deserializing rule type
strings

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add tsd.core.tree.enable_processing configuration option

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add TSDB.processTSMetaThroughTrees() for processing new TSMeta as they come in,
if configured

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify TSMeta.incrementAndGetCounter() to pass new TSMetas through tree builders

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add TreeRpc to handle HTTP API calls for adding, modifying and deleting
trees and their associated data. Documentation coming soon.
Add parse and format calls for tree information to the serializers

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Break out meta data CLI synchronization into it's own class as UidManager.java
was growing too large
Add MetaPurge.java as a CLI utility to purge meta data for downgrading
Add TreeSync.java as CLI utility to build or delete tree data and/or definitions

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Merge remote branch 'remotes/official/next' into next
Fix TSMeta custom field storage serialization bug
Complete the annotation class with storage write and read calls