[caldav] Fix crashes in AuthHandler

This commit adds some pointer guards to AuthHandler, to avoid crashing
in the case where no auth/method or auth/mechanism keys exist in the
global service of the account.