mg.c: Reorder cases in a switch()

This is in preparation for combining two cases in a future commit
mg.c: Reorder if else clauses

This is to allow two cases in the switch statement to be combined in the
next commit
mg.c: Use $! code for $^E on platforms where are same

Only a few platforms have $^E distinguished from $!.  On all others they
should behave identically.  Previous commits, have caused these to get
out-of-sync.  This causes them to share code so this won't happen again.
mg.c: White-space only

Outdent this code as a result of removing outer blocks