pine-importer: Fix a crash when importing with no existing address books

This is a theoretical crash (not actually reproduced), caused by the
client variable being NULL if no address books exist. Instead of
crashing, gracefully exit with an error.

Found by scan-build.

https://bugzilla.gnome.org/719540

(cherry picked from commit 7cb2ed6c67b09ca0f2ece3ca4d56b60e97b5ac6f)
icalendar-importer: Fix a crash when importing with no existing cals

This is a theoretical crash (not actually reproduced) caused by calling
g_object_ref(source) when source is NULL, which can happen if no
calendars or task lists exist.

This fixes the crash, but there may be UI bugs if this condition is
reached.

Found by scan-build.

https://bugzilla.gnome.org/719540

(cherry picked from commit d6e2d993bba77ad5965961c534ffe73cae39511a)