Improve snapScrollToBottom with ResizeObserver and smoother scroll
Refactors the snapScrollToBottom action to use ResizeObserver for more reliable scroll-to-bottom behavior on content changes, and enhances scroll settling by waiting for animation frames to handle late layout shifts. Also improves detachment/reattachment logic and ensures cleanup of observers.