MB-12251: Improve query parsing errors

Add more end-user friendly error messages when the query parameter
are invalid. This commit also adds tests.

Change-Id: I1a6902aa62750e7e5109d1a6956bc15f486904e1
Reviewed-on: http://review.couchbase.org/42304
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>