Record signal events through the main recorder loop.

#293

This is actually a pretty big simplification to the signal-recording logic.  I think we'll be able to pull off #215 with just a patch or three after this one.