Auto-increment the thread_id

The thread_id is the row_id of the Mms provider's threads table. Threads
are created and deleted as various drafts come and go. Bugs in the past
have been linked to using the wrong thread. One issue was the result
of not clearing the app's thread cache when a thread was deleted. To
help avoid these sorts of problems, the thread_id is now an autoincrement
key. The threads table will never reuse a thread_id. A new thread will
always have a thread_id one greater than the max ever seen in the table.
The upgrade to add the AUTOINCREMENT keyword is only executed after the
other db upgrades have run.

Change-Id: Iaed04bc02af504d4132ff3f5cf9b732ebf9eaf47
1 file changed