add a global histogram + fix blit
This MR adds an extra histogram that is filled with both tilings, so a common histogram is provided for the frontend.
It keeps the other histogram for now just in case, but they could eventually be removed later if not needed.
There was an issue in blit
with images that starts partly outside the expected area: the wrong piece of the image was copied and used forthe histogram. This should now be fixed.