Make type guessing for query args more robust

Improve the error handling of the type-guesser for queries
against metadata fields, and add some test coverage for
specific cases that came out of the discussion of the
source of the bug.

Fixes bug #1221736

Change-Id: I27f84aa2538d2a69a3d7b7e93c36813df8d35204
Fix to return latest resource metadata

Addresses the latest resource metadata not being returned in
the MongoDB, SQLAlchemy, DB2, and HBase drivers. A schema
change was required for HBase, because it was overwriting
historical metadata.

Closes-Bug: #1208547
Related-Bug: #1201701
Implements: blueprint hbase-meter-table-enhancement
Change-Id: Ib09e21cbc7bbd45a6ecc321403e9947df837e14b
Merge "Make type guessing for query args more robust"