Fix world-readable permissions due to sqlite race condition

Existing code uses umask() to temporarily modify the file permissions for
open(). A race condition can occur where a second thread reads in the
temporary value, saves it, and then restores the file to the temporary value
resulting in world-readable permissions. Backporting a known fix:
http://www.sqlite.org/src/info/6c4c2b7dba

Bug: 15288755
Change-Id: I89779f3a5ba0bec181d6614b29b1e26ea4f4f049
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Revert "Revert "sqlite: Rename perf flag""

This reverts commit 400cb302ff6fe9c36e9435074b0f438c352c18c1.
Regenerate Android.patch

Android.patch was out-of-date

Regenerate with README-Android

Change-Id: Iab0765f67eeacc1282d495250ced6b8d0f1c156c
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Upgrade to SQLite 3.8.6

Downloaded from http://www.sqlite.org/2014/sqlite-amalgamation-3080600.zip

Change-Id: I02ae188e741697f6755ffc607cdb471bcdd2915f
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Regenerate Android.patch

Android.patch was out-of-date

Regenerate with README-Android

Change-Id: Iab0765f67eeacc1282d495250ced6b8d0f1c156c
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Revert "Fix world-readable permissions due to sqlite race condition"

This reverts commit 7a61b96d0ba02583458e0ef2a9a0274eff3daebf.
Upgrade to SQLite 3.8.6

Downloaded from http://www.sqlite.org/2014/sqlite-amalgamation-3080600.zip

Change-Id: I02ae188e741697f6755ffc607cdb471bcdd2915f
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Revert "Upgrade to SQLite 3.8.6"

 * Breaks some apps. The world sucks at SQL.
 * https://jira.cyanogenmod.org/browse/NIGHTLIES-243

This reverts commit 26c7c10733122fd2301cc92d66248e47ec843789.

Revert "Revert "Fix world-readable permissions due to sqlite race condition""

This reverts commit 492aa1c10b19487d41d0b17d2a4aac81ab8d781a.

Revert "Regenerate Android.patch"

This reverts commit 80b85e42493de8b00757e4c23058275e00d2c5ad.

Change-Id: Idf7e8b316d6718dffd1a7cde4727353f437925c0
Merge remote-tracking branch 'cm/cm-11.0' into HEAD

Conflicts:
	dist/sqlite3.c

Change-Id: Ifffa92f27f2893a936c8a5af7447e63535d8a5cb