gpui: Reduce manual shifting & other minor improvements (#34407)

Minor cleanup in gpui.

- Reduce manual shifting by using `u32::to_be_bytes`
- Remove eager `Vec` allocation when listing registered actions
- Remove unnecessary return statements
- Replace manual `if let Some(_)` with `.as_deref_mut()`

Release Notes:

- N/A
d1abba0d33tidely committed on 7/15/2025, 2:39:33 PM· committed by GitHubparent0506598
5 files changedLine totals unavailable