Create logger.js

Things don't yet work well with Node. But should work in the browser as both a window-level global and an AMD module.