Issue #25: cancel guard when manager is closed

- Adds a state machine hook for cancelling the guard when the manager is
  closed.

closes #25