Remove tabs and fix some JSHint warnings
Use for..of instead of deprecated for each syntax

The old syntax still worked, but for some reason included a trailing
function which resulted in several glitches:

- The current activity wasn't detected anymore
- The activity list included an entry with NaN for start/stop time
- The summary line wasn't displayed anymore