Merge pull request #88 from ctiller/shutdown

Add an optional server shutdown event.