Add hooks for database open and pragma handling

Change-Id: I0c1843a1c17e6cb7786ea5c66d229282b1fa0d32
SQLite: Updated hooks for database open and close.

Change-Id: I38135eaed3b5e66ef302eb0337f1bf3ba9f184d7