renamed sockjs.js to functions/socket.js

moved all sockjs code from app.js into socket.js