Add imports support to scope detection

Also local functions can be globaled now. A weird thing, but it's how it
works in python.
Fix bug with several unscoped passes
Parse class scopes
A note to self about base class and arg defaults visiting