CBLQueryBuilder: Allow OR, NOT operators if args are not $-variable-based
CBLQueryBuilder: Reject more invalid predicates

* Predicates that don't specify any view key
* Expressions that contain both doc properties and $-variables
* Comparison predicates where both sides use variables

Added a unit test for checking known illegal predicates.

Also don't turn off inclusiveEnd in a query without an endKey.
CBLQueryBuilder: Simple reduce support (one numerically reduced value)

Supported functions are count, sum, min, max, avg, stddev, median.
See TestCase(CBLQueryBuilder_Reduce) for an example of usage.