Add a callbackLoop and related constructs.
Add a callbackLoop and related constructs.

See Note [callbacks].

Note that this still isn't quite right; currently in some places our
callbacks are accumulated pre-event by combining them with (>>), which
means they aren't run as separate transactions like they're supposed to
be. Fixing that is my next task.

zenhack/haskell-capnp