SQLite: Add support for WAL mode

As per issue 78507, we are looking to add support for SQLite databases
to use Write-ahead logging (https://www.sqlite.org/wal.html) mode in
Chromium. WAL mode should give us significant performance gains across
almost all use-cases.

This change is a first step towards achieving this. It adds opt-in
support to enable WAL mode for a database connection and perform a
checkpoint. It also adds a feature flag to enable WAL mode for all
databases by default to investigate its feasibility and impact on
performance.

Bug: 78507
Change-Id: I7fc5edcc39b50d2a13755d587cf342bded1af60a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095927
Commit-Queue: Shubham Aggarwal <[email protected]>
Reviewed-by: Brandon Maslen <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Reviewed-by: Chris Mumford <[email protected]>
Cr-Commit-Position: refs/heads/master@{#780318}
diff --git a/sql/sql_features.h b/sql/sql_features.h
index eee5770..76c4a63c 100644
--- a/sql/sql_features.h
+++ b/sql/sql_features.h
@@ -14,6 +14,8 @@
 
 COMPONENT_EXPORT(SQL) extern const base::Feature kSqlSkipPreload;
 
+COMPONENT_EXPORT(SQL) extern const base::Feature kEnableWALModeByDefault;
+
 }  // namespace features
 
 }  // namespace sql