Backport of Python 3.9's pkgutil.resolve_name which resolves a name to an object.