Move transform_if() algorithm to experimental
Add event::set_callback() method

This adds a method to the event class which allows the user to
register a callback function to be invoked when the event reaches
the specified state (e.g. when it completes).