Fix error case for unexpected input
Pass fsm itself to callback function

This is to ensure that the caller knows which connection has an event.
Require cl-lib and use cl-prefixed functions