MB-7013: Make JavaScript tests less fragile

Improve the tests. Have one more test for count, but also improve
the query parameters of the bounding box tests. There flipping the
coordinates still make the tests pass. This was changed.

Change-Id: I654a8c3ed0797704cac4c86be57305e0a09d1695
Reviewed-on: http://review.couchbase.org/25130
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
CBD-681: Support open/wildcard intersections

If a MBB contains the atom 'nil', it acts as a wild card.

If only one end of the range is 'nil' it will only cover that end.
If it is 'nil' on both ends, it's like a wild card and it will
cover the other range completely.

Change-Id: I066d517692da17164be578d672cb0fc9fbea6f8a
Reviewed-on: http://review.couchbase.org/25131
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>