Fix module iterator to not go past the end of attached modules
BUGFIX: Set flush timout to 1 sec to avoid retriggering scheduled tasks

When the timeout for flushing log events is set for < 1s (0.5s) and
it is scheduled in the first half-second, i.e. by a function that is
itself called from an RTCC alarm, then when the flush event fires,
all of the previous scheduled calls for that second will be called
again.  This results in post_report being called twice in tandom, leading
to serious issues.
Properly initiatize scheduled task structure.
Do not remove tasks that are not scheduled.
Merge pull request #115 from timburke/pr-reportingbugs

Fix bugs in MoMo reporting firmware