Show remaining characters in counter.

If a message length limit is set, the counter will now
count down toward this limit and turn red if it is exeeded.
Add some comments to chat.js
Replace internal references in chat.js

Modules executing their own functions use "this".
Make /connect and /quit available while waiting.

This may save having to reload if the connection
attempt gets stuck.