Fix crazy client-side system settings change crashes

Fixes Issue #355 

Properly handles EINTR calls sent by the system for client-side system text size changes, screen locks, graphics changes and a few other other circumstances.