Refactor whoosh indexing scripts to help make it easier to make it more fault tolerant.
Add KeyboardInterrupt protection to write index in whoosh indexing script. Fix signal function when KILL is issued to script.