Insert NULL values when downsampling.

This commit also changes the downsample semantics as we no
longer freeze the stream but we only downsample up to the
last inserted datapoint. This means that in order to achieve
an equivalent to previous semantics one must now append
additional NULL datapoints before calling downsample.