Enabling WAL

Enabled write ahead logging and made transactions non-exclusive so they
do not block threads that are trying to read from the database

Test: We use in-memory databases for testing, which means we cannot use
WAL there. To verify that WAL is indeed enabled, manually check that
the following log appears in the logcat, when opening the database:
ContactsDatabaseHelper: WAL enabled for contacts2.db: true

Bug: 30830389
Bug: 31600627
Change-Id: I47f452b837c823fd33e85aa799d0ca60ed970d73
4 files changed