Listens for document-level mouse, touch, and keyboard events to detect
user activity. After timeout ms of inactivity the bar hides with a
slide-down + fade animation. pauseAutoHide/resumeAutoHide use a
ref counter so nested menus work correctly.
When timeout is not set (undefined or 0), returns identity styles
and no-op pause/resume functions — zero overhead.
Manages auto-hide behavior for the ControlBar.