JCBC-421: Rewriting the Query internals for better performance.

This changeset is a complete rewrite of the Query object internals while
keeping the external API completely identical. Under the covers, it now
uses a String array instead of a HashMap to provide faster looping and
better cache friendliness.

Also, values are now encoded and quoted (if needed at all) during the set time
and not when the query string is created. This gives even better performance
when most of the Query objects are cached and just fields changed on the fly.

It also uses a custom compiled regex to identify JSON objects and does not rely
on the slower spymemcached "isJSONObject" anymore.

In JMH benchmark tests, performance was 100% better or more compared to the
old implementation. The performance difference is even higher when more params
are set on the Query object.

Change-Id: I73e9157093d5f0ea82b72d424548d1bc34afd5b5
Reviewed-on: http://review.couchbase.org/33930
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>