Enhance the WAL header sync so that it honors the various synchronous
pragmas, settings, and device characteristics.

FossilOrigin-Name: 9799241f7de952c4d1ea8bf6508b577d2b57a370
7 files changed