Bug 570896: Optimise happy path

By optimising the happy path of the lookup, we can save about 10% of
the cost of comparisons.

Refactor existing code into FileStoreUtil for convenience and to mark
other methods as private.

Change-Id: Ie828af3d31edfd032f7cdbb915f4757d516db0ab
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
4 files changed