sqlite3: Reliably detect data query vs modification SQL statements.
sqlite3: Implement cursor.lastrowid .