Move reduce to its own module, add reduce1 and unit tests. Extract
asap() function and use fast dispatch instead of apply() when
possible.