Fix attributes processing in ActionMetaclass

ActionMetaclass.__new__() creates a class object twice. At first,
it uses DeclarativeFieldsMetaclass.__new__() only to get a side effect
of gathering form fields to base_fields, and then it uses type.__new__()
to create the resulting class object. Dropping the first created class
object results in ignoring all that DeclarativeFieldsMetaclass.__new__()
does with it (currently, it adds a 'media' attribute).

This change uses the class object returned by
DeclarativeFieldsMetaclass.__new__() adding Meta options to it,
thereby fixing the issue.

Change-Id: Ia4ee0e7187846ea13c04505cbbe7b999c2044871
Clean-up deprecated diablo code in index.html.

Fixes bug 1101614.

Change-Id: I4cf326abe7fa6bf45ebf3b6f9bc009a1c6029e31
Merge "Fix attributes processing in ActionMetaclass"
Merge "Clean-up deprecated diablo code in index.html."