SessionAttachmentNode
Optional session-attachment lifetime for resources that cannot remain active while their retained tree is detached.
Ordinary LifecycleNode ownership is unchanged: a session keeps its nodes across detachment and only performs ordinary lifecycle cleanup when a node leaves the tree. These additional callbacks run on the tree owner thread, never dispose a node, and must not mutate session state. Implementations must tolerate an already active initial attachment and an already suspended terminal cleanup. Callback failures trigger best-effort cleanup of the remaining nodes and preserve the original failure.