The wayland client code has support for translating raw linux input
device key codes coming from the wayland compositor into key symbols
thanks to libxkbcommon.
A backend directly listening to linux input devices (called evdev, just
like the Xorg one) could use exactly the same code for the translation,
so abstract it a bit in a separate file.
Move the private Backend API to a separate header.
This also allows us to finally move the class vtable and instance
structure to a separate file and plug the visibility hole that left
the Backend class bare for everyone to poke into.
Always use pageflipping, but avoid full repaint by copying back dirty
regions from front to back. Additionally, we dealy copying back until
we're ready to paint the new frame, so we can avoid copying areas that
will be repainted anyway.
This is the least amount of copying per frame we can get away with at all
and at the same time we don't have to worry about stalling the GPU on
synchronized blits since we always pageflip.