Add two run loop observers that:
- Create a TRACE-level span when the run loop enters a new state.
- Drops the span when the run loop exits that state.
These spans attach information to events, such that e.g. resizing a view
produces messages like:
```
TRACE inside runloop{mode=NSEventTrackingRunLoopMode}:timers:
winit_appkit::util: Triggered `drawRect:` target="winit_appkit::view"
TRACE inside runloop{mode=NSEventTrackingRunLoopMode}:timers:
winit_appkit::util: Completed `drawRect:` target="winit_appkit::view"
```
Added a common interface that:
- Uses closures instead of static functions. This should allow easier
refactoring in the future.
- Returns a handle which is invalidated on `Drop`. This should avoid
situations where the event loop has exited, but an observer is still
called because the user spawned the application later on.
- Is properly main-thread safe.
This interface is placed in winit-common, to allow using it in both
winit-appkit and winit-uikit.