Reverted mongoid generator to use config/database.rb instead of yml file.

Reverted mongoid generator for to use `config/database.rb` instead of `config/database.yml`.

However, I left the indications on how to use that on the generated `config/database.rb`.

Also implemented `ENV['MONGO_URI']` as @j15e's suggested. It will default to it if set.

#985.