Extend qualification should take place in file scope.

Prior to this change resolution of types would take place in the scope of the fully-qualified name of the type you were extending. This was incorrect behavior.

For example,
```java
extend google.protobuf.FieldOptions {
  optional Foo foo = 1;
}

enum Foo {}
```