Attempt to prevent multiple entries.

The indexer now tries to find a document with the given project before indexing.
If it finds one it does not create a new document, instead it changes the text
and re indexes it. This may not the be the correct way to update a document in
xapian.
Warn if search returns doc without project
Prevent indexing multiple times.

This prevents ading several documents by using replace_document. It also changes
the project term to lower case because the query parser seems to do that
automatically.