sophia: new compaction logic

This patch makes big optimizations changes to compaction
process and cursor iteration:

* Compaction merging complexity changed from O(n) to O(1) in
terms of involved files.

* Move away from mmap in favour of pread and
custom buferization.

* Introduced cursor cache. Cursor operation
complexity changed from O(n) to O(n/page_size) in terms of
disk reads.