Fix session management for shared caches.

* Each participant now has a manager thread
* Each participant has a shared cache session

Refs issue #1176
@michaelcahill I'm not sure if it's kosher to have one flags variable with two different prefixes?