actions: update test function parser to handle variable amount of arguments

Update the test function parser to handle variable amount of arguments,
as that's now needed for the perm() test function.  Up till now, though
updating the test parser has been a TODO, it been a low priority because
it's done what's needed.

Updating the parser to speculatively read the number of arguments
present (and hence handle variable number of arguments) has been a
TODO even without the need to handle a variable number of arguments
because experience gained updating the action parser to do this showed
it generates better syntax error messages.

Previously the parser just parsed the number of arguments expected, and
then quit.  The parser now parses all the arguments present, and then
compares it against what was expected.

No big deal?  Well guess what gives the better syntax error if you
enter too many arguments.  Reading just the number of arguments
expected, and then quitting, means the extra arguments cause to
paraphrase a "I expected a ) here, and I got a comma or string".
Now, you get an error message like "I got 5 arguments, but only
expected 2".  Which IMHO is a better syntax error message.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2 files changed