this PR picks up #33164
on systems where posix_fallocate() is unavailable, the fallback implementation of AllocateFileRange() can overwrite parts of blk00000.dat with zeroes. as a result, -reindex appears to complete successfully, but only the genesis block is recovered
this PR fixes the fallback path so that when reindexing happens, the existing blocks are correctly restored instead of getting clobbered
the second commit (fdec41914f2218c3c8bfe033a2612c6029854a1a) takes some inspiration from #33228, specifically this commit 2c113ebc2d3ab559ccaf400a1953724bb15b1574.
fixes #33128