Component templates handle <script>, <template>, and <textarea> sources

Handles various cases needed to make component config behave as expected. As mentioned in #1418.