libcdecl: Fix parsing of very long parameter lists.
The way the parameter parser rules are currently arranged requires
shifting every parameter symbol before any part of the parameter
list is reduced. Thus, functions with a lot of parameters (about
5000 or more) can lead to a parse error since the symbol stack is
exhausted (even if there would otherwise be enough memory to
allocate this many parameter items).
Technically this kind of failure is permitted by the C language, as
implementations do not need to support functions with more than 127
parameters. However, it is better to avoid arbitrary limits like
this and it is not a big problem to do so.
Collecting the parameters in reverse order allows the list elements
to be reduced as they are encountered, which avoids excessive use
of the symbol stack. The final list has to then be reversed again
prior to returning from the parser. This is actually how the prior
release 1.2 worked so this is technically a regression fix.
Expand some test cases to cover this behaviour. We actually don't
have any tests targeting the parameter ordering (although randomdecl
and crossparse quickly catches it) so add some of those too.