ruby: fix type export in the context of subclassing

The issue here was that the TypeExportNamespace was not robust to
subclassing, and therefore subclasses of classes that have already
been extended with it did not have their attributes properly
initialized.

Use utilrb's attribute() to get automatic initialization, and inherit
extended
Merge remote-tracking branch 'autobuild/master'