More flexible logging configuration

Allows, for example, redirecting logs to a file instead of the console.
This change breaks settings.loglevel option (which is now ignored), but it was not documented in settings-sample.coffee earlier. If you think this is not a good idea then the patch can be modified to support both configurations, but that would not be so maintainable in the future.