make resolve_stub handle ErrorIntent and FuncIntent, in addition to StubIntent.
minor docstring fix