Extend the upper limit for the cache size to 4Gb.

This will let dt cache around 131000 compressed thumbnails.
Fix support for uint32_t value in preferences.