Move logging code to util.js

R=yhirano@chromium.org

Review URL: https://codereview.appspot.com/9711045

git-svn-id: http://pywebsocket.googlecode.com/svn/trunk@769 4ff78f4a-9131-11de-b045-6380ec9940d4