Support generating tablenames in more cases.
Extends naming rules to apply to base classes of models.