Add method to clear a Realm

Safer alternative to #971 until we respond appropriately to deleted Realm files.

Fixes #967

@tgoyne @jpsim