Thread can't be deleted

Bug 6593778

Delete all the messages in a thread and the thread comes back. If you
get a row in the pdu or sms table with an empty thread_id, the query to
delete threads that aren't referenced by any message fails. The query
has to weed out messages with no thread_ids.

Change-Id: I2a2121a27a4d4ce9ed02b8415dc50b0a59623d94
2 files changed