compare floats with epsilon
remove unnecessary code
extract method isCachedBigger
extract more methods
fix float comparison for negative results
fixing typos/spellings
adding unit test for cache mechanism
Merge pull request #8019 from owncloud/thumbnail_fixes

Thumbnail fixes