Add after hook

This hook can be used to execute some code after the last state. Can be
used to close some paired actions (i.e. mouseUp/mouseDown) without
taking screenshot.