Make parentNode to be set in FakeWindow().

The parentNode of the child being appended wasn't being added when
appendChild() was being called. This meant that whenever we went
back up the tree of nodes in the parseContent() function current
would become undefined.
Add tests/util/cue2json.js for creating test-ready JSON from parsed cues.