make 'stop' event handler

This is for reporting 'termination' to the application.

When Trema called shutdown! method of Controller object, Controller calls 'stop' handler if it exists.