Implimented shortcut function auto_expandable.

auto_expandable creates automatically expandable generator functions
for a given class.