Improve texure painting performance when limited scale is active.
Cause of the slow down is that the image editor draws the image in maximum resolution,
but the 3d viewport uses the limited scale. The GPU textures used the same texture space
and needed to be uploaded twice to the GPU.
This patch will adds texture slots that can hold the scaled down and the maximum
resolution image. This would allow better cache hits and reuse of existing caches.
**TODO**
There is an increase of memory when limit texture is enabled, but the texture fits inside the limited size.
In this case the identical texture is created twice. We should look how we could solve this.
There are several ways to solve this:
Patch get_image_gpu_texture_ptr to check if max resolution already exists and smaller then limited resolution. Use the max resolution.
When creating an limited resolution check if it fits within and store it as a max resolution.
Main challenge is that we only know when we create the image if it was possible to allocate the memory.