[sql] Stats gathering for sql/ APIs.

Generate stats for how many SQL statements are executed, how many
results they return, and how many changes they make.  Generate timing
values for how long is spent doing all queries, doing updating
operations, doing autocommit updates, and commiting transactions.

The goal of these metrics is to quantify results of decisions like
enabling write-ahead log or memory-mapped I/O.

BUG=489788,489444

Review URL: https://codereview.chromium.org/1145833002

Cr-Commit-Position: refs/heads/master@{#332503}