General code cleanup, whitespace, dead code removal, added missing prototypes. Made Xquartz come to foreground later in startup, so it doesn't appear for Xquartz -version (cherry picked from commit 36922e8ff4)
36922e8ff4
(cherry picked from commit 08ebf86d37)
08ebf86d37
Leaving xpr unflattened since we want modularity to replace that with xpc (XPluginComposite) at some point (cherry picked from commit 48e6a75fbd)
48e6a75fbd