Delayed saving of index to disk

- Write the index after 2 seconds when there's no more scheduled changes to the index.

Improve performance of git status (#1494)

review: @gaurave @devoncarew