Updated CSVHandler

* Updated CSVHandler to make sample-count-per-period configurable (was fixed at 250).
* Updated CSVHandler to fix possible missed samples with the same timestamp.


CSVHandler used the timestamp of the last sample as a check for the next run. Thus, if there were multiple samples with the same timestamp and the count-limit was reached after the first, the other samples would be skipped at the next run. This fix should make it that if there are multiple samples with the same timestamp, they are all read regardless of the count-limit.