applyXSLTransform is too eager

There's nothing that stops ProcessingInstruction from applying XSL Transforms
to HTML documents or from applying incompletely loaded XSL Transforms. This CL
adds a couple checks to avoid these cases.

The XSL Transform system is a bundle of insanity. So much of the system makes
so little sense it's hard to know where to start fixing it. Eric Seidel's
opinion is that we shouldn't drive the XSL transform process from style
resolution. Instead, we should kick off the transform either from
DOMContentLoaded or from the XSL sheet's load event. We tried a couple
approaches along those lines, but we didn't finish them for this CL. Maybe
we'll get that working for a future CL.

R=eseidel
BUG=260105

Review URL: https://chromiumcodereview.appspot.com/20856002

git-svn-id: svn://svn.chromium.org/blink/trunk@155043 bbb929c8-8fbe-4397-9dbb-9b2b20218538