Stricter macro substitution syntax

This change introduces a separate routine to parse for valid macro
names.  Valid macro names are either regular 3+ character identifiers,
or special names: "0", "#", "*", "**", macro options such as "-o" and
"-o*", and macro arguments such as "1".  Other names are not valid.
This fixes a number of bugs seen earlier due to sloppy name parsing:
"%_libdir*" and "%01" were not expanded (these are now expanded to e.g.
"/usr/lib64*" and "<name>1", as expected).  This also fixes bugs in
as-is substitution: "%!foo" was expanded to "%foo", and likewise "%!!!"
was expanded to "%" (and to "%<garbage>" at EOL).

Also, bad names in %name and %{name...} substitutions are now handled
differently.  In %name form, the name is parsed tentatively; a silent
fall-back to as-is substitution is provisioned when no valid name can
be obtain.  In %{name...} form, a failure to obtain a valid name is now
a syntax error.  Furthermore, only 3 variants are syntactically valid:
%{name} proper, %{name:...}, and %{name ...}.  This renders invalid
ambiguous macro substitutions such as the one found in FC18 lvm2.spec:

Requires: util-linux >= %{util-linux_version}
error: Invalid macro syntax: %{util-linux_version}