Clean-up SqlStore::newEntityRevisionLookup

This makes the three layers much more visible in the code.

Change-Id: I8f048f5e243c269bcf743fbd91de99286f30ad19
Merge "Clean-up SqlStore::newEntityRevisionLookup"