Change chat code to prevent XSS injection

Changed chat related JS files to use document.createTextNode.
Since the program can't use <br> anymore, This commit modifies CSS
file to accept white-space using:
    white-space: pre-line;
Also, server isn't supposed to accept JSON object for chat message.
So this commit changes to use string for chat instead of JSON.

Putting raw text to DOM without any escaping makes the program
vulnerable to XSS injection. This can be prevented by using:
    var textNode = document.createTextNode(string);
    element.appendChild(textNode);

Prefer using DOM instead of using raw HTML, since it can be harmful.