Move oldDoc handling to sync_runner

Simplify the support for oldDoc id in the sync function by moving it to the sync_runner handling, instead of byte-level manipulation of raw oldDoc content.