Fix vertx database tests.

Two issues are fixed:
avoid an exception in the /db test when the ?queries= arg is missing.
generate the right json in both database tests.