switch to ConnectionProvider flow

add tests for client reconnecting/special connections/lifecycle/etc