Don't emit __extends if one is already in scope

Addresses #1350 and probably some other suggestions as well.

This changes the "do we need to emit __extends" logic to see if a symbol named `__extends` is already in visible scope at the site of the class declaration.
Good point. Should we have the emitter handle this, or just say that only a global __extends is valid?