move compacting-logic to own file
add failing tests (that only happens sometimes)
refactor: unlink in compactor.compact -> compactor._unlink