Event Bus Implementation — Publisher-Subscriber System (Part 2: One-time & Wildcards)
Extend the core Publisher-Subscriber event bus from Part 1 with advanced features: (1) subscribeOnce(event, callback) — the listener fires only on the first publish and auto-unsubscribes itself; (2) wildcard subscriptions — listeners registered with '*' receive all events regardless of name; (3) event namespacing support (e.g., 'user:login', 'user:logout' grouped under 'user:*'). Ensure subscribeOnce is thread-safe (no double-fire in rapid successive publishes) and the wildcard does not interfere with named subscriptions.