convert cookbook_name to string for database.yml

Same issue as https://github.com/opscode-cookbooks/application_ruby/pull/11 but fixed for the database.yml template when using "database_template"