Use Realm.close() in unit tests

in case getInstance() fails