Fixed locking in MongoBox, extended demo

RWLock didn't work since read lock cannot be upgraded to write lock,
therefore we just use a single lock.