Turn cleanup() into an atexit() handler, simplify signal registration, exit with sigcode

Howdy Patrick,

Couple months back spent some time crashing 2bwm and sending it various signals to see how cleanly it exited. I found that some of these signals weren't getting handled, and that also it doesn't really matter if for some reason they fail to register.