Add X.Org's standard C warning flags to AM_CFLAGS
And then take care of a bunch of new warnings that come from it:
- Fix 185 -Wdiscarded-qualifiers warnings
- Handle 5 -Wmissing-prototypes warnings
- Handle a -Wstrict-prototypes/-Wold-style-definition pair of warnings