Fix failing 2.11 test.

The test tested that occurrences in files with errors don't work. In 2.11
the type checker is a bit smarter.

Re-wrote the test to succeed, and run it only in 2.11 (ignored for now,
as it turns out to be flaky).
Fix race condition between deleting a file and reading it.

Wait for the indexer to delete the index for a deleted project.
Merge pull request #83 from dragos/issue/fix-tests-211

Fix tests for 2.11