Add border, make stuff static.

Needs a lot of changes, given that we cannot draw borders around
*everything*: context menu windows (override_redirect) will make the WM
crash if there is an attempt to draw borders around them.

Furthermore, functions and variables have been declared static now
(cleaner).