Solidify index and query semantics.

The protocol for sending progress updates and hits is now well-defined:

  1) A subscriber will never get non-empty hits.
  2) A subscriber will never get a progress udpate of 0.0.
  3) After a progress update of 1.0, no more hits will follow.

Some first query unit tests exist now as well.