Some improvements/cleanup of the new compaction code

The parent rev body was being backed up before the sync() fn was called,
so it had to get loaded from the db again so its body could be passed
as the 2nd param to sync()…
Also moved some utility functions out of crud.go into base.