Closes #11882
BREAKING CHANGE: Previously when `--location` was set, the unique storage key was derived from the the URL of the location instead of just the origin. This change correctly uses just the origin. This may cause previously persisted storage to change its key and data to not be available with the same location as before.
This PR improves localStorage write throughput by around 150x by caching
the prepared statements for SQLite and adding some DB pragmas.
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>