Refactor: remove code duplication
ThumbnailCache::lookupRawData() isn't currently used anywhere, so
technically I could have just removed it. OTOH, removing the code of it
that was duplicated in lookup() makes the overall code cleaner so I went
with that option instead.