External commands on events

These changes address issues 87 and 22 by adding the ability to trigger
external commands on print start, done, cancel and z-height change.