Refactored MemoryEventStore

Locking done at stream-level now
Added abstract class to describe interface