libs: backends: Fixes.

* Fix off-by-one in GP_BackendUpdateRectXYWH()

* Allow for NULL UpdateRect and Flip
  - fix backends accordingly
core: GP_Common.h: Add GP_CONTAINER_OF()
libs: backends: X11 backend code refactoring.

First part of the cleanup + initial support
for multiple windows.