add resolve_stubs, FuncIntent, and StubErrorIntent.
rename StubErrorIntent to ErrorIntent, and add tests for resolve_stubs.
add a handy utility function for retrying effects.