MB-7013: Improve compaction test

The compaction test now also checks if the index contains exactly
the same documents pre and post compaction.

Change-Id: Ibf7eeba9fb01590d80fa2d69423640fac7f8f0fc
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
Update for recent Apache CouchDB 1.3.x changes

COUCHDB-1334 [1] was reverted in a8aff9f91790b0dae347b10b7c11b21f34faa0b2 [2],
hence GeoCouch needed to be adapted as well.

[1] https://issues.apache.org/jira/browse/COUCHDB-1334
[2] https://github.com/apache/couchdb/commit/a8aff9f91790b0dae347b10b7c11b21f34faa0b2

Change-Id: I5f31e390accbc27ba9b409b465b8e7d32e26d906