[PATCH] Prefer the use of NonSASL authentication for gmail instead of SASL
As discussed in the chatroom, I noticed that by using NonSASL authentication gmail honours the resource sent by the client instead of forcing the random string at the end. (Some old Kopete versions did this, and that's how I noticed this 'feature')
The attached patch reworks the logic used for authenticating, to prefer the use of NonSASL over SASL for gmail (and falling back to SASL in case if fails).