Fixing Node#parse for HTML document nodes.

See related commit 89db31137f7f2b8f31dfc68e8d445fc801687037 which broke this functionality.
Processing instructions can now be added via Node#add_next_sibling.

This completes the fix begun in 0ea3e76f8cc8857a1a146810826d936fdd18f601.
Escaping a quote in a test to fix Emacs font-lock mode rendering.
Added Node#document? and refactored some code to use it.
Added Node#processing_instruction? and refactored some code to use it.