queryservice_test: re-optimize

The last change to queryservice_test doubled its runtime
from 40 to 80s. This CL brings it down to 55s. Essentially,
curl was getting launched for every test case. Now, it gets
launched only once per run.
I still need to figure out how why this didn't bring it back
all the way down to 40s.
queryservice_test: more optimizations

Most of the delays were due to generous wait (100ms) for curl to record
its output. The tests actually work fine even with a 10ms wait. I've
doubled this to 20ms for good measure. The test now runs in 23s.