Tweaks to your nice JS client for aria2

Hello,

Actually, all explanations can be found in commit messages. I realize that some of these changes can be refused at the very first time. But everything can be discussed and I'm ready to re-work some of my changes.

Looking forward to hearing back.

PS.
I'm server guy and newbie in JS.