correct timing of HTMLImports parsing hook installation and add test. Fixes https://github.com/Polymer/CustomElements/issues/126.