Sort out console logging

The rule is that we only use the console.log to display the hopefully
live list of unhandled rejections in the browser. In Node.js, there is
no hope for this, but we do want to unconditionally log all unhandled
rejections at termination. We want to display deprecation warnings
regardless. In all cases, the console must exist in scope.