Remove activity leak

The conversation cursor was maintaining a static reference to loaders
and the resolver. When the cursor was loaded immediately after
orientation changes, the CursorLoader framework returns the existing
cursor. This cursor contained the reference to the old activity.  This
also meant that the sResolver reference was stale till the
conversation cursor was recreated.

As suggested by ath@, we remove the static ContentResolver, and rely
on a member.

Also, as suggested by ath@, we use the ApplicationContext, which
removes the inner memory leak that was being caused by the
CursorWrapper holding on to a context, which held on to the previous
application.

Just one activity on rotate (after GC).

Also contains minor code cleanup: removing unused import and cleaning
up incorrect javadoc on methods.

Bug: 7883592 mild activity leak

Change-Id: I09043c38055e5d7ed2fb345286b1f293e39bf4c3
3 files changed