Python-xlib misses some essential features like shm support.
This is why the Xshm module was written,
but this leads to redundant dependencies.
So this commit removes python-xlib as dependency.
During the translation of the code the determination of the pid of a
window was also improved.
The XRes extension is now used to determine the pid of a window.
There are common sizes in which images are
likely to be displayed in.
(smaller or equal to the screen size)
If images reach a specific resolution the
principle of spatial locality doesn't apply anymore
to resize operations to common sizes
(e.g. 6000x6000 to 300x300).
So to reduce cache misses and therefore avoid
a worse performance images are stored by default up to a size
which is about the same as the screen size.
Images will be fully loaded if it's required by their
image scaler or if they should be displayed with a size
which is bigger than the screen size.
Exceptions are already catched on updating an image,
so these exceptions shouldn't be thrown here.
E.g. a corrupt image should lead to an exception on adding it -> not
added