jslint cleanup
jslint cleanup

Unfortunately this is will be hard to decipher without a diff -w
as jslint wanted everything shifted over once.

There were a fair few unused variables, logic problems, and
even some missing code that was discovered as a result of
this. Some of that stuff remains to be fixed.

I suspect much of this is just going to go away, but in order
to see what should go it is important to know what's there
and without these changes, it is quite hard to tell.

TiddlySpace/ts.js