Fix keyrest eating an argument unconditionally in rest logic.

In the logic for preparing a rest argument, we were subtracting
1 from available args if a keyrest arg is present. However,
keyrest should only consume an arg if keyword args are given on
the call side, and this case is already figured into arglen
calculation before we get to the rest logic. Removed the extra
logic for subtracting keyword arg element from args list.

Fixes #1223.
Propagate keyrest through Open3.popen3 to internal version.

This also includes a fix to remove the keyword args from the arg
list when processing the command. If we don't remove it, the arg
list appears to be length > 1 and a single space-embedded command
line will not be split into its component arguments.