Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.
Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.
This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
- added compatibility method to Canvas to allow SDL_Surface access
- added drawBorder method to Canvas to replace CSDL_Ext method
- added drawColor method to Canvas to replace CSDL_Ext method
- minor changes to Tavern and Trade windows to adapt to new API