Make console logging function configurable.

Split log() into 2 methods: formatArgs() and log(), allowing log to be
overridden on a per-namespace or global level. Global log settings trump
per-namespace settings.
Merge pull request #108 from timoxley/console_error

Make console.x configurable.