* include more ancestors in candidate scoring
* fix medium-3 testcase
The original source file contained two copies of the document, which
was causing incorrect results
* remove unnecessary nested elements
* fix removal of empty elements
* add option to regenerate all testcases
* update tests
* fix quanta testcase
* fix creating testcase from network
* fix early exit in testcase generation
* format HTML before comparing while testing
* upgrade js-beautify
* don't merge outer readability div
For instance, jsdom's more spec-compliant parsing causes issues with auto-closing elements (lifehacker article) and with not having self-closing <img> and <br> tags. The former was fixed by removing offending markup, the latter by adjusting JSDOMParser to be more sane, and the expected outputs to cope with this.
Finally, JSDOMParser automatically drops comments. The test code needed to manually do this in the jsdom case.