Updates the resolveObj method to work within a context object

Additionally, this adds a call to eval if the method cannot be found on the document.
Moves resolveObject to a public function and adds tests.

I see this as a utility method moving forward.
Making it public allows others to call, as well as making it unit testable.