Fix long parsing in CmHomeContentProvider.

Was not parsing long values correctly. Fix these bugs that can crash the
ContentProvider on certain operations.

Change-Id: I18b3b4b1bd400dafd1e3b65a33930a5911a4aa5f
Fix issues with deleting cards.

Moved UI operations into a handler that will run them on the main
thread. Fix a few bugs that would cause a crash when cards are deleted.

Change-Id: I69cb20ab5ba46a3cedf6e383f2b667b7b0cc4d80