Implement DataSet::setExtent to allow true resizing (not just extending) and use it where appropriate

This will fix a couple of places where we currently use DataSet::extend() which will correctly work in case we enlarge the dataset but not if we want to shrink it. The latter is a problem size in a few places we also relay in DataSet::size() returning the correct size to know how many values are actually in the dataset.
This will also make Values work as expected and so fix issue #36.