Expose compact function

- Expose compact function on CDTDatastore
Possibly `-compactWithError`