Review fix: extract shared event handlers to eliminate duplication
The 7 event handler callbacks (isFlipped, acceptsFirstResponder, keyDown:,
mouseDown:, mouseUp:, mouseMoved:, scrollWheel:) were duplicated verbatim
between WeView and WeMetalView class registrations (~120 lines). Extract
them to module-level extern "C" functions and a shared
register_view_event_handlers() helper.
Also rename MetalView._state to MetalView.state since the field is actively
used (not just kept alive for drop).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>