(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.
The intent is to ensure that a boolean is returned, and not something else. Here if other_scope is nil, nil is returned and not boolean true.  We use the bang-bang to do this rather than something longer like:
```
if other_scope.nil?
  false
else
  other_scope.exist?(variable_name)
end
```
Which may also be slower (unconfirmed)