Fix findAndDetachComponents to work with non-Element Nodes

If the value is not an Element we assume it's an array, this fails for TextNodes. Add additional check to make sure we can read it as an array.
Stop loading substitution content before firstDraw

- Stop loading content before the firstDraw, enterDocument is now called even if the component didn't request to draw. The substitution loads its content at the first enterDocument, this is because the switchElements are only ready by that time.

- If the substitution switchValue changed in a way that in the next draw it's going to draw the same element then we should just draw what's in the document and not what's in the switchElements because the element in the document might have changed (a component that changed its element to its template).