[PATCH] lib/database.cc: use flush Xapian method instead of commit