Bug 678893 - Allow concurrent authentication sessions
I wrote the original queuing algorithm for authentication requests to
serialize requests to ensure password prompts never pile up. But that
means requests for which a cached password exists may wait longer than
necessary, especially if an authentication session already in progress
is taking a long time to complete.
This was before I started using GcrSystemPrompt, which also serializes
requests to ensure password prompts never pile up. That frees us up to
process authentication requests for different data sources concurrently.
This commit simplifies the queuing algorithm significantly and also
makes it thread-safe so authentication requests can be submitted from
any thread. This is going to be important for ECollectionBackends.