Added waitfortotal parameter that blocks until total # hits is known.

This is used for the CLARIN SRU endpoint, which reports the total right
away (not asynchronously).