Complete implementation of publish and retrieval.

Abstract and refactor publish functionality by creating a
PublishableCard superclass. Complete publish/update/unpublish
functionality. Add support to retrieve DataCard and DataCardImage
objects from the ContentProvider data.

Change-Id: I898d363ea84b8675802b33db9dc444f7ec2ec322
Fix NullPointer bugs and DB create syntax.

Fix a number of null pointer exceptions that can occur when writing
Cards to the database, if some fields had not been set. Fix syntax for
creating SQLite tables that had missing commas.

Change-Id: Iccb51ef6de99a7bf6650952bce9cd3d1aa34ede7