Move shared transform operations out of the 3D viewport key-map into a
template function which each modes key-map uses.
This allows sculpt mode to key-bindings which where bound to transform
actions that don't make sense in sculpt mode.
Note that this enables `alt_navigation` for some 2D viewport actions
where it's not yet used.
Based on design task: #105298.
PR !110019.
Co-authored-by: Julien Kaspar <JulienKaspar>