rewrite.py: fix bug where lambdas confused scope tracking
rewrite.py: fix bug where lambdas confused scope tracking

push_scope() and pop_scope() were inconsistent with regards to
scopes that are neither FunctionDef nor ClassDef. Make them
consistent, fixing scopes "leaking" out to surrounding code.

Reported by Kai Willadsen, debugged by Robert Schroll.

https://bugzilla.gnome.org/show_bug.cgi?id=665174

alexey4petrov/reinteract,alexey4petrov/reinteract,alexey4petrov/reinteract