Revert "Streamline error handling and locking" (fixes #172)

This reverts commit 116f232f5a20ca0e4d61f776c99e9a10b1cfa8dc.
Revert "Fix protocol close test"

This reverts commit 92c1ce57a698d6e45388a403557b592191ad46f3.
Smarter initial index sending
Streamline error handling and locking, with fix for close() race
Stop repository if the directory disappears (fixes #154)
Remove refereces to JS source mapping files
Merge branch 'master' into events

* master:
  Remove refereces to JS source mapping files
  Stop repository if the directory disappears (fixes #154)
  Streamline error handling and locking, with fix for close() race
  Smarter initial index sending
  Revert "Fix protocol close test"
  Revert "Streamline error handling and locking" (fixes #172)