DocSearch : When updating the index, specify optimize=True to Whoosh

Signed-off-by: Jerome Flesch <jflesch@gmail.com>
Main window: Let a half-second goes by before trying to load the thumbnails. It makes the GUI slightly more smooth

Signed-off-by: Jerome Flesch <jflesch@gmail.com>