Fix crash with pending

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>
Dont crash if no pubdate

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>
SyncAdapter and applyBatch implemented

Move synchronization to a SyncAdapter.

Additionally, commit all database changes in a sync in
a single transaction using applyBatch. Sync time goes from (minus
networking) ~50 seconds to ~1 second, for around 760 items.

Note that you must never run the SyncAdapter in a different process!
The amount of operations committed will crash the app before they
ever reach the ContentProvider.

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>