Add an option to configure the stats sample interval.

This adds an option to configure the stats sample interval from the command line arguments. Even though the default 100ms is good for many cases, some tests benefits from controlling this for more accurate stats.