ENH: components should be able to write code for before the window

writeStartCode() occurs after the info dlg
writeInitCode() occurs after the win exists

This was needed to support eye-tracker components which need to calibrate
before the window appears.