data-sort: added support for sorting multiple bases
data-sort: turn on merging of bases on defrag

This groups all sortable/defragable bases into groups that are within
cfg.blob_size and cfg.records_in_blob limits.

PS. Such grouping optimization is NP-hard problem so use very trivial
algorithm: add base to group while their sum met limits.
data-sort: always merge empty bases