net/disk_cache/sql: Implement serial execution for checkpoint.

Currently, SqlPersistentStore::MaybeRunCheckpoint executes checkpoints
on all shards concurrently. Since checkpointing involves frequent disk
access, concurrent execution might lead to disk contention and
inefficiency.

This CL introduces a new feature param `kSqlDiskCacheSerialCheckpoint`.
When enabled, checkpoints are executed serially across shards.

It adds `SqlPersistentStore::RunNextCheckpoint` to handle serial
execution, accumulating results from each shard.

The existing `WalCheckpoint` test is refactored into
`RunWalCheckpointTest` to verify behavior with both serial and
concurrent execution, and with single or multiple shards.

Bug: 443174708
Change-Id: I2c59ba9b5eea86ea311515d39811e58ac9ac87ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7583155
Commit-Queue: Tsuyoshi Horo <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1586098}
NOKEYCHECK=True
GitOrigin-RevId: 3093be0c48d1f47c302f73e40d4209dfab078804
5 files changed