Refactor connection state management (#326)

This PR does the work described in #326. All unit tests pass.

I've split the work into 3 commits, and tried to make each as clear and self-contained as possible, to help reviews.

I'd really appreciate if you guys could take a look, this touches on some very fundamental things.
In a next review, we can remove all references to "Shared" connections. In the beginning we had the idea of using it because we thought it would be used. But after learning more about the ADO.Net connection semantics, we never implemented it.