Configurable signal handling

Fixes #83. This adds two new configs `leave_on_terminate` and `leave_on_terminate` to control the handling of the INT/TERM signals.