Gumbo: Fix the segfault that lcamtuf identified through fuzz-testing:

http://lcamtuf.coredump.cx/.smieci./gumbo_segv.small

The problem occurred when a formatting element was opened, a <frameset>
resulted in all nodes being popped off the <body>, and then a whitespace
character followed the ending <html> tag.  When the <body> is removed and
replaced with the frameset, I destroy it to prevent a memory leak.
Unfortunately this also frees the formatting element contained in it, but there
are references still on the list of active formatting elements.  When that list
is reconstructed to add the whitespace character at the end of the <html>, the
non-existent formatting nodes are cloned, causing a crash.

The fix I'm doing is just to clear the list of active formatting elements when
the <body> is replaced.  This isn't quite in the spec, but this is enough of an
edge case that I think the deviation is okay.

This also fixes another bug where the ending </html> tag wasn't being properly recorded after framesets.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57745367
Fix a read past the end of the buffer that was discovered through
fuzztesting.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57920685
Fix #65, where a doctype error was showing up in the errors vector even
when the doctype was correct.  The cause was an AND instead of an OR in the
logic to check for this.  Also added tests to assert this condition.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=58437090
Drop down the recursion limit on SanityCheckParentPointers.

This caused an unexplained sigsegv in SanityCheckParentPointers on a
test file that parses into a DOM tree 27,500 nodes deep, and dropping
the recursion limit seems to fix it in all clients.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=58939249
Removing unused functions which break C++ compilation.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=59436275
show errors
Merge https://github.com/google/gumbo-parser