Reindexing dirty files files before navigation

References #1. There are problems still:

 1. Reindexing is asynchronous operation, navigating right after it
 won't work.
 2. If file is dirty and have already been reindexed there is no need to
 reindex it again.
 3. If we do `Undo` in editor file won't be reindexed because it's not
 dirty anymore.
Refactor call to `rc`
Removed debug output