closed-and-joining:
when scope.close() is called
while scope is in the open-and-joining state or
the operation state op is started
while scope is in
the closed or unused-and-closed state,
scope moves to the closed-and-joining state.
joined:
when the count of assocations drops to zero
while scope is in
the open-and-joining or closed-and-joining state,
scope moves to the joined state.
Recommended practice: For simple_counting_scope and counting_scope,
implementations should store the state and the count of associations
in a single member of type size_t.