[Sequential] Fix compilation
[Parallel] Perform queries during indexing

The document partitioning approach is being used to process the queries
in parallel with indexing. The global index is divided in sub indices.
Each sub index is will store a subset of the document set. The index
are indexed in parallel and when a sub index finishes its indexing
(the max number of files was indexed on that sub index) the search
thread starts to perform the query on that sub index.