Add: Definition to check if index has a document?

resubmit karmi/tire#567


In more simple cases when we using batch processing with random ordered queue we need to check if main data from database has been indexed before index data from another source like log or messaging.