Added ReactionFunc, fixed retaining Reactions

New class ReactionFunc wraps a function1 used to execute function, and
makes it slightly less confusing to pass functions around.
Fixed retaining of Reactions by Boxes - they were incorrectly retaining
the Reaction's function, then need to retain the actual Reaction key to
work properly.