newdb: Speed up multisort() by lazy evaluation

The sort keys for the sub-sorted columns are now only evaluated on demand.
The common case is that the keys from the first column will differ,
therefore we can speed up sorting on average by delaying evaluation of
the sort keys for the second and later columns, only evaluating them
when the sort keys of the first column for a particular book differ.
The gains will be particularly noticeable for columns where calculating
the sort key is expensive, like composite columns or the series column.