Exception handling in indexing process

This improves the exception handling in the entire indexing
process, that is, `Index`, `SourceIndexer` and `ProjectIndexJob`,

Generally `Try` is used to indicate that methods might fail. Most
failures related to indexing is handled in `ProcessIndexJob`. If
the index breaks it is deleted and a fresh one is created. If it
can't get the parse trees because the presentation compiler is broken
it will stop the indexing job and log the error. Files that can't
be indexed because of an IOException will be ignored and the
error logged

Tests have been added for the behavior of `Index` and `ProjectIndexJob`
when failures do happen.

Fix #1001629
Merge pull request #22 from mads379/1001629-handle-exceptions

1001629 handle exceptions in Index