Working in-memory Realms

In-memory Realms were previously broken when used across multiple threads. This change now uses writelogs with in-memory Realms to fix this issue.

Then interface for in-memory realm creation has also changed. 

@tgoyne @jpsim