Fix a bug where NameError#name returns a qualified name in string

Following up to #15764. AS::Dependencies is still breaking Ruby's original behaviour, which is:

  * It only returns a const name, not a qualified aname
  * It returns a symbol, not a string

```ruby
$ irb
> begin
>   DoesNotExist
> rescue NameError => e
>   e.name # => :DoesNotExist
> end
>
> class A; end
>
> begin
>   A::DoesNotExistNeither
> rescue NameError => e
>   e.name # => :DoesNotExistNeither
> end
```

cc @arthurnn