Synchronous script element loading and execution

This is required for execution of dynamically-inserted script elements.  It
also adds some infrastructure for future support of the `async` and `defer`
attributes.