Base class for OpenTSDB queries.