Refactors and expands autoresolve functionality.
Plain strings may be passed to HtmlDocument constructor.