Allow promises and thunks in call graph, part 1

This diff creates an opening for promises and thunks, but doesn't
actually test them.  The main change is in Dispatcher.runOneStep(),
which must now deal with these different cases.
Testing promises and callbacks