Performing the queries

Besides the search, this patch change a lot of other things:
  - Using Java's LinkedBlockingQueue as the index-buffer. This data
    structure is a lot less error-prone and also more efficiente than
    the buffer implemented with refs;
  - Using agents to store the sub-indices that are ready for query;
  - Using a single ref to store the file buffer.