(PUP-3718) Make defined function handle qualified variable names

The defined function can answer if a variable is defined. There
were however no tests for qualified variable names. The implementation,
when given a qualified name simply tried to lookup the complete name
in its own scope which naturally failed.

This commit adds logic to check if a variable is qualified in the
Scope#exist? method, and then mimics the behavior of a variable
lookup by splitting the name, then looking up the class and its scope
and finally delegating the exist? call to that scope.

This is made somewhat complicated when testing due to the fact how
scopes are wired (to find other names scopes). The test that checks for
the existence of a top scope variable now sets this up as if the main
class (called '') had been evaluated.
I don't believe we'll need the `!!` here. If the expression `name =~ /^(.*)::(.+)$/` evaluates to nil it will just go to the other else branch.

```
[12] pry(main)> if nil
[12] pry(main)*   true
[12] pry(main)* else
[12] pry(main)*   false
[12] pry(main)* end
=> false
```