Shallow queries were previously doing tons of useless queries into
dependent ontologies which would have been filtered out anyway. Also
EntityInstances.QueryIndex.perform now optimizes two corner cases:
* only one search result which is usual for GUID searches
* removal of Types:*Entity filter term which is useless because all
instances are entities.
refs #7415
Change-Id: I89b9495ea51ca8fba4bd40db113c91f4a12932d0