SettingsProvider: Migrate STATS_COLLECTION to secure.

  Migrate STATS_COLLECTION to secure from system table while
  retaining the user preference. Moving it to secure allows us
  to do per-user settings.

Change-Id: Ia55fdd8c6db418c4eaebf17a54b765d25a878471

Conflicts:
	core/java/android/provider/Settings.java
Turn off carrier provisioning by default to allow tethering

Whether or not to use carrier provisioning is a setting hidden to the
end user that is currently not set. Unfortunately, on some carriers that
may result in it being set to yes, or effectively set to yes, without
other accompanying changes that must occur, such as setting a tethering
apn and possibly having a carrier provisioning app, resulting in hitting
a paywall when a tethering plan exists, or, worse having nothing happen
at all when you try to tether since the data doesn't have an apn set.

Change-Id: I3b5b3cc86e3325302411f46e3fd5f7a7c1b9f57e

(cherry picked from commit 5980a9e74ea28173ab0763e19914c5d61af3bc93)

(cherry picked from commit 1b6b79c1a11bbb1ffb8fd27c3141076a88ed302f)

(cherry picked from commit 77adb28edb982e2653c305c8ceb113c503cd0773)

(cherry picked from commit b84a3ef36724a9326e307635846d1d484725fb2b)

(cherry picked from commit d6864609a1b8225be044376a3cf4f5f511e9f20b)

Conflicts:
	packages/SettingsProvider/res/values/defaults.xml
Missing break in switch statement

Change-Id: I462c0c5fec96a850032266b04419ec409ad02174

(cherry picked from commit 4dba87d529632cb99e6014c640f3bb3b26d37393)

(cherry picked from commit bc90a5a14bd0319698d36121c7d0730de6734c3f)
Change SQL to improve performance.

To know the number of images, use "COUNT(*)" instead of "_id" in SQL.
Using "_id" gets all result set. and when getCount() is called, CursorWindow is filled.
But using "COUNT(*)" gets just 1by1 data.
So using "COUNT(*)" is more faster than now.
And this SQL is called everytime per a file during a file transfer in MTP
The better way is by using "EXIST".
But if using "EXIST", modify MediaProvider.call() method.
So i applied just a "COUNT(*)"

Change-Id: Ic5882af0fad2304f836b7b7043a4746359391609
Signed-off-by: muzbit.kim <muzbit.kim@lge.com>

(cherry picked from commit 5e2edb4ce62b261aabf9ed11cc7120f812d56df6)

(cherry picked from commit 26fe45a5c03371b2527e417e10a67bf68e0f1772)

(cherry picked from commit ff7d148ed2ea8fa2a76d7370d5b4fd4603a1520a)

(cherry picked from commit 3cf6a5a0a702553e066cceb9ba7dbac2c2b343c4)

(cherry picked from commit ef49f3e0242d58b80e155313915eb4c5ebb9d451)