Multithreading

Seperation of polling, input and rendering into three threads. It's
worth noting that depth-sorting among patches is performed in the
polling thread (which is also responsible for creating the patches).
The render thread only receives a thus ordered list of patches to
render.

Therefore, depth-sorting may be out-of-sync as much as generation of the
content itself. Because the whole program is just for training purposes
and that's a smaller issue, it will not be changed.