Fix and optimize getValuesAtIntervalOp data extraction.

- only the data extracted in the last loop iteration of ExtractSamples() was
  emitted as output

- if e.g. op interval < sample interval, there were situations where the same
  sample was added multiple times to the output