Improve Indexer read/write locking in Interpreter

- writers do not block readers anymore
- writers block each other so that writes are carried out sequentially
- add XMVar to support this
- resolves #6