Fix ClassAd::GetInternalReferences() with nested ads. #4777

Now, attributes in an enclosing scope are considered external. When
attributes in an interior nested ad are referenced, only the name of the
attribute in the top level ad being scanned is returned as an internal
reference.
Use new ClassAd::GetInternalReferences() behavior in compat layer. #4777