Compiler optimizations for page checksum code.

Ants Aasma and Jeff Davis
Ensure we MarkBufferDirty before visibilitymap_set()
logs the heap page and sets the LSN. Otherwise a
checkpoint could occur between those actions and
leave us in an inconsistent state.

Jeff Davis
Record data_checksum_version in control file.
The value is not used anywhere in code, but will
allow future changes to the checksum version
should that become necessary in the future.
Bump PG_CONTROL_VERSION to 937
Temporarily silence pg_upgrade's checksums check
Revert previous temporary patch
Fix pg_upgrade for 9.3 with data checksums.
Previous changes misconstrued pg_upgrade internals
causing build farm breakages.
Add regression test for bug fixed by recent refactoring.

Test case by Andres Freund for bug fixed by Tom Lane's refactoring
in commit 5194024d72f33fb209e10f9ab0ada7cc67df45b7