add tests for ContextIndex
refactor ContextIndex interface

deleteContext used ContextIndex directly while insertContext used ContextMap.
Also insertContext did not include inserting the Schema for the new Context,
which really should happen in the same function.