Cherry pick from master and remove unused/autogenerated files

* Instead of custom macro logic use to check warning CFLAGS let MATE_COMPILE_WARNINGS(maximum) handle it.
* With the above all custom macros can be removed.
* Remove autogenerated files and update EXTRA_DIST
* Cherry pick a commit from master (some only in my master. see PR #34)