Fix #184: extend fsm.Error with reset callback

With this change, the device author can decide how to handle resets, i.e. which reset function need to be called for which error state and what the next valid state will be.