Fix race conditions in Snowflake client library
This is a fixup for !42 (closed), with the addition of some unit tests and a fix for two more races that were detected during the testing process.
This is a fixup for !42 (closed), with the addition of some unit tests and a fix for two more races that were detected during the testing process.