maintcheck: refactor rules checking '*.am' files
A small refactoring in our syntax-check to avoid code duplication
and to ensure more uniform checking. This change introduces some
new failures in syntax-check rules (both real and spurious), that
will be fixed in follow-up changes and code reorganizations.
* Makefile.am (ams): New variable, holding the list of all the
'*.am' fragments in he automake source tree.
(sc_no_brace_variable_expansions): Use it.
(sc_rm_minus_f): Likewise.
(sc_no_for_variable_in_macro): Likewise.
(sc_mkinstalldirs): Likewise.
(sc_pre_normal_post_install_uninstall): Likewise.
(sc_cd_in_backquotes): Likewise.
(sc_cd_relative_dir): Likewise.
(sc_tests_make_without_am_makeflags): Likewise.
(sc_tests_plain_egrep_fgrep): Likewise.
(sc_mkdir_p): Likewise.