thumbnails: load exif thumbnail first for very small previews.

this is f* fast and utter rubbish. you'll only get it if you have
enabled the embedded thumbnail loading, and only for thumbs < 200px wide.

maybe we should actually store updated versions of that in xmp every time
we evict a low-res thumb from our caches.
(cherry picked from commit c6973d723fa5ab57966ed85f4a9893baff6df5f9)
thumbnails: tonecurve counts as altered image.
(cherry picked from commit 8e65a2175ce92855f2edebf9d412435e819b5fcc)
Fix potential segfault due to a race condition

... or something like that
(cherry picked from commit 45882506be48ffe54444afa7746d84fd3a7c3ac4)
new dithering module
(cherry picked from commit d271ed1069d1ae73249085cac20a5a8a8a5ec9ea)

Conflicts:
	src/iop/CMakeLists.txt
	tools/iop_dependencies.py
dithering: set Floyd-Steinberg 8-bit as default; no mulitple instances
(cherry picked from commit a3edc93cfc5600b7e5af83f78a5b6c22df314441)
dither: don't use unsupported flags
dithering: small fix for display of scaled down images
(cherry picked from commit 523f323443b8c9a1519ab560032a2fde4bd741d7)
dithering: prevent possible crash in case of tiny image sizes
(cherry picked from commit c7cb694c455c44f3ef08bf1fddf8286006f1a99f)
dithering: automatic dithering according to output format with module being auto-applied
(cherry picked from commit d41531d53f9045e31c8a2c713b0f1363c47cb5de)

Conflicts:
	src/develop/pixelpipe_hb.h
	src/imageio/format/j2k.c
dithering: have a config option to deactivate automatic dithering in center view for speed reasons
(cherry picked from commit 0e58b652bde11feeb7fcf620bfcc9c8d4cbc6f60)
dithering: SSE for speedup
(cherry picked from commit 6a062d2b342a2316fbe5e60ca6dd36bb3a1550ad)
dithering: a few more comments in source code
(cherry picked from commit cd57fbad557ea8fec4d5f232176ea3892104dac5)
dithering: catch NaN's in input image so they don't flood the whole output
(cherry picked from commit 5d1a454409c761d8c855f085f8a8ebb226039f6e)
do no longer autoapply dithering; modules needs to be activated by user

this avoids that images are marked as modified even if history stack
is purged
(cherry picked from commit e72e6c8d573dea1d5c0807e1b90594d360ad1b7c)
dither: run style beautifier
global tonemap: add to iop dependencies.

without this commit, the hardcoded priority will slip into rgb color space
instead of Lab.
(cherry picked from commit 46ed05e9363faeeafc013e92e6ae1bcf7a8295a6)
module priorities: added global tonemapping. (like 837a5775ac4fe8ec4ed931212d0d953b9b3b954e)