test: Clean up documentation and simplify

* Document why the ajax fetch for scripts has to use <script>
  (or sync XHR).
* Remove this hack for the second script, as that one doesn't
  need it.
* Fix typo.
* No need for piping into a new Deferred with .then(), using
  Promise.done() instead.
test: Rename assert.toJSON 'json' parameter to 'obj'