Xext: shm: simplify dispatcher
The dispatcher functions are much more complex than they're usually are (just switch/case statement). Bring them in line with the standard scheme used in the Xserver, so further steps become easier.
Also a preparation for #1701