implement class_alias()

@ltratt @vext01 Is the direct use of the class cache OK?