Adding support for multiple stats commands run separated by interval

It would be interesting to collect the info from stats/state commands in a repeated way (e.g. 10 times with 600 seconds interval), for troubleshooting and monitoring reasons.

Settings, mappings and static values in general are not in the loop of course.

Subsequent captured files are renamed .2, .3 and so on.0