kivy/kivy — pull request #1318 by tito (2013-06-27 11:15:08+00:00)
Title: Fix kv language leaks (and some others)

``Widget`` and ``Instructions`` now have a ``proxy_ref`` property that returns a weakref.proxy object. This object doesn't keep a reference of the instance, and the usage is totally transparent.
We use it in Builder to prevent cycle reference between Widget / Instructions / externals properties / etc.

We now keep tracks of all callbacks created during the apply() of a widget rule to the widget. When the proxy dies, we unbind() all the rule that still exists of the current widget. Because ``proxy`` is not hashable, we keep track of the relation with ``widget.uid`` <-> all the callbacks.

Also, dynamic classes are now cached, and not recreated each time we want to instanciate one.