Don't log to STDOUT on production.

- Scoped the `defined?(Rake)` and production check statements to
individual methods for easier testing and more clarity.
- Created a test with two contexts to simulate production and
non-production environments.

This closes #43.
I think that you should have three examples: one where by default `app.database.logger` is a `Logger` (here you don't need to do any setup), and 2 where either `Rake` is defined, or app is in production.