refactor resolveLocalRef() to use get()
add dereference() alias for resolve()
draft resolve remote refs
note it does not recursively resolve remote refs

add emitter, emit "resolved" on all pending refs resolved

refactor resolveRef() into private method

add tests for emitter, special cases of parse()
finish draft interface