Fixed loops in history.js

Unused vars, still
Fixed loops in options.js

Some unused vars and TODOs
Fixed loops in popup.js

There were no loops.

Also no JSLint warnings. :D
{previewscript,profiler,suspended}.js fixed loops