make production aspect/compilation testable

This was done to catch any regressions with externs. Ironically,
this doesn't handle that case yet because the only code that uses externed js, spinner,
doesn't live in simulated.* which is what is required for tests (because
file path apps don't allow CORS).
fix spinner

* spinner should re-spin if turned off by Esc or being stopped
* spinner should stop when overlay is hidden