Avoid lengthy stack traces for log(undefined); Improve log(<xml/>); Patch by Benjamin Young. Closes COUCHDB-895.