Refactor RuleVisitor._resolve_refs

When resolving circular references it is necessary to avoid infinite
recursion.  Previously this was done by tracking unwalked_names and
walking_names.  Now infinite recursion is prevented by setting
expr.members to None while recursively resolving member expressions.