Improve list parameter support

Parameters which use the formate name[index?] are better supported.

A parameter in the form name[] will be a list parameter called 'name'.

A parameter in the form name[123] will be a list parameter called 'name',
and will be sorted by the numeric index given.

A parameter without a valid numeric index will not be treated as a
list parameter, eg: name[blah] would not be a list parameter.

Multiple instances of the same parameter name will be promoted to a list
parameter (as before).