Add support for parsing img element.
Fix crashes during parsing and add <img> to test1.html to test.
Fix bug that prevented image node from being added to the vector of paint nodes.