State machine library for Objective-C