edx/XBlock — pull request #278 by cpennington (2014-11-25 19:29:42+00:00)
Title: Remove many of the metaclasses from XBlock.

The majority of our metaclasses existed for one purpose: To add the
same variable to each created class that wouldn't be affected by
inheritance. For instance, a class might need to collect information
about which services it was requesting, and without a metaclass,
that _services_requested variable would be shared among all of the
subclasses of the RuntimeServicesMixin.

The second use of metaclasses was to add names to all XBlock Fields,
because those names are available at class construction, but not
to the Field object directly.

This commit removes the first class of metaclasses in favor of the
@class_lazy decorator, which calls a method one time per class, and
then returns the results of that method for every future access
of that class attribute.

The second class of metaclasses was abstracted into a single metaclass,
NamedAttributesMetaclass, which will add a __name__ attribute to all
class attributes that are instances of Nameable. This should make
it easier to provide new and different types of declarative XBlock
interfaces in the future.