Allow States to return reasons on STATE_FAILURE that are sent to clients. Make os::init and os::uninit be called automatically.