port to new soledad async api

**Not ready to merge, missing changes in leap.mail and maybe other to be compatible with the new API**

It needs to synchronize the merge with the soledad async API and the upgrades in leap.mail.
You are right, even if in all if-cases I initialize *d* it's good to initialize before the if-stuff. Here it doesn't matter, but I prefer to initialize it as `d = defer.success()` as the return value in all the cases is a deferred.