OAK-631: SegmentMK: Implement garbage collection

Simplify TarWriter.cleanup()
Allow cleanup to proceed even when no commits are pending
Extend the oak-run debug feature to allow inspection of existing data

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1584258 13f79535-47bb-0310-9956-ffa450edef68
OAK-631: SegmentMK: Implement garbage collection

Flush the segment writer before and after a checkpoint to reduce the chance
of a checkpoint ending up in a segment together with some unrelated changes
which would then prevent that checkpoint from being garbage collected

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1584259 13f79535-47bb-0310-9956-ffa450edef68