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.