API: made more robust SSTemplateParser->includeDebuggingComments()

includeDebuggingComments() was breaking HTML in some edge cases

if you use something like this (eg from html5 boilerplate):

    <!--[if lte IE 8]> <html class='old-ie'> <![endif]-->
    <!--[if gt IE 8]> <html class='new-ie'> <![endif]-->
    <!--[if !IE]><!--> <html class='no-ie'> <!--<![endif]-->

the parser would put the comment after each `<html>` tag, which would make the HTML invalid (comment inside a comment)

the parser now tries to insert it right after the doctype if one is available, or after the `<html>` tag that is not inside a comment

Tests for several edge cases have been included:
- no doctype
- html4 doctype
- html5 doctype & IE `<html>` tag
- no doctype & IE `<html>` tag

The code & tests for the no doctype cases can be considered overdoing it.    
At the time of sending this pull request it produces valid output in almost any possible case, question is, do we care about those cases where no doctype but `<html>` is given?

the only possible case that is not covered in this pull request is #1792