And use this method from the Prolog predicates, in order to remove the
dependency on the index when indexing rules. This fixes the two
remaining tests in RulesIT.
The newly introduced method doesn't query the index to find accounts
by their preferred email. Instead, the external IDs cache is assumed to
be consistent with reality. This method is used in PatchSetInfoFactory
and EventFactory to allow usage of these two classes from an environment
with no index access.
The underlying issue (accounts with no external IDs) is already fixed,
and this change is a first step towards removing the patches required by
it.
Change-Id: I93a91c11f6473dfe9e4d9b56c27a351234b50e56