Use getIdentities

After the change in stdlib I changed all gIdentities-calls to getIdentities/getDefaultIdentity.
I have to admit that I didn't test all changed methods thoroughly as I don't know when they're called.
I also tried to call toLowerCase() on all strings that were compared with an email-address in an identity.
I don't think that's correct. The code skipped the extra "default" key to get all email addresses. Normally, with the new getIdentities function, you can skip the `if` altogether.