rewrite of light table caching

features:
- fixed mip map levels for usual screen resolutions, naturally extends to 4k/8k screens without invalidating the cache
- simple implementation with debugging facilities for read/write locks
- thread safe api
- thumbnails are written to disk upon eviction, not forgotten (only way to delete them from within dt is removing the image from collection)
- offline create all thumbs using 'darktable-cli --generate-cache --core --library /your/library.db'
- disk backend is simple jpg files, you can actually look at them and just delete them safely, no db index required.
- no more [bundled | dependency on] libsquish,

possible drawbacks:
- not sure this will work on 32-bits (calls alloc/free a lot, will run out of virtual address space)
- will use unbounded disk space (like 1% of the storage of your raw files, for 20MB raws, if you need /all/ thumbnails of all sizes). possible strategies to improve that in the future are: write only mip0-2/user configured bound, stop writing if disk is filling up.
- cached jpg files are many and small, might interfere with some file systems with large block sizes.

That if makes no sense since imgid is unsigned.