Fix syntax errors in all definition files

I fixed the syntax errors in all the files that were causing the "Syntax checking" phase of the tests to fail.  With this set of changes, this test phase should be 100% successful.  (The "Typing tests" phase still has several failures.)

I made the most minimal change I could in each case.  I attempted to ensure that the semantics of each change were correct, in some cases by inspecting the source code of the corresponding JavaScript library.

I also fixed a couple of spelling mistakes in the test runner.