Rebase stylesheet urls in the template

We were only rebasing images urls.
With this change we no longer need to rebase url's when preloading or 
adding the stylesheet to the DocumentResources.

This also fixes an issue on IE where it automatically loads a stylesheet resource when the node is imported to the window document even if it's not attached to it.