Require the top file and autoload Base class

The generators entry point file is rails/generators so we need to make
sure uers will be able to use the generators when requiring that file.

Fixes #12802