Lazy loading javascript

With this patch for lazy loading panel specific javascript each panel in it's element would specify the relevant files:

<element name='my_panel'>
  <template>
    <section>
      I am a nice panel!
    </section>
    <script src='panel_specific_js.js'></script>
  </template>
</element>

Approach is borrowed from the settings app.