Create one connection per thread

This messes with the standard closing API, and requires more thought.