Refactor handling of inlined and excluded import insertion

Remove "stored position" finding, which was the source of many head scratching.
Put inlined imports at the top of <body>
Put "excluded" imports after platform.js, or at the end of <head>

Fixes #10