Add #where support for MemoryScope.

@dkubb I actually thought that some bigger speedups could be possible with doing some in-memory indexing later.