shell: implement 'for' loop processing

The following now works:

    $ ./sh_c 'for a in a b c ; do echo a=$a ; done ; echo $a'
    a=a
    a=b
    a=c
    c