document how to create custom rails environments

Add a section on custom Rails environments to the configuring guide. This was discussed with @fxn in #8976.

I also added a link to that section in the AM guide.