Lock-free thread communications.

I know you were looking for a lock-free map implementation, but I've done this with queues anyway as I don't know of another implementation.  This now separates out threaded and non-threaded queries and actually runs a separate thread for EVERY SQL connection, not just one for them all. (seems far saner in the case of two different engines at the least).