Another attempt to fix failing stat.test

Move stat_cleanup(), which resets the statistics
skewed by recovery to the place after recovery_finalize(),
to take into account records from remaining WAL files
which are read in recovery_finalize().

Rewrite stat.test to not use space with a system
id 0.