automatic chunk cache size based on available memory

As I always have problems with too small chunk cache on larger monitors,
I added an automatic calculation of the maximum size based on the
available memory. There is also a new slot alowing to change the cache
size based on a given window/desktop/monitor size.

For Windows x32 and x64 builds have to be handled separately, as this
changes the memory available to a process.
The Linux code is not fully tested, but should work in principle. It
would be great if someone could do deeper tests here.
Yes, it should... I will fix it in some future commit.