Implement bulk operations on the split modulestore.

It's good practice when using thread locals to do that check. Hopefully it'll go away when we get rid of `_begin...` and `_end...` in favor of jsut having each MS implement a context manager.