HTMLStyleElement only applies CSS in the document

HTMLStyleElement will not parse a style element created in Javascript until it
is attached to the DOM.

This fixes the bug #2107.

I added a reftest for the given cases:

  * a style element is defined in the HTML code,
  * a style element is created in Javascript, CSS content is added to the
    element and the element is later attached to the document,
  * a style element is created in Javascript, attached to the document and
    later CSS content is added to the element,
  * a style element is created in Javascript, CSS content is added to the
  * element but the element is never attached to the document.