Only check for cached RLMRealms when using the shared schema

Dynamic realms aren't cached, so looking in the cache for a dynamic realm is at best a waste of time, and could give the wrong thing in sufficiently weird circumstances.

@alazier