jim.c: simplify JimDictExpandArrayVariable()

Signed-off-by: Steve Bennett <steveb@workware.net.au>
bench.tcl: fix the pi benchmark

The previous version didn't actually get the correct result!
Add ary_static.
For expand, move the list creation outside the loop
Make some minor changes for version compatibility

Signed-off-by: Steve Bennett <steveb@workware.net.au>