The `nextLightClientSyncTask` helper is generic enough to be useful for contexts besides libp2p based light client sync. Extract it.
Reduce code duplication when checking response of `UpdatesByRange`.