log: removed old racy logging code

We don't use !__GNUC__ compilers
data-sort: fixed error check for datasort_base_get_path()
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
Merge pull request #31 from SaveTheRbtz/master

Datasort: implemented merge of small blobs on defrag