Double buffer

Double buffering in sequential loops (forLoop and whileLoop). Improves performance by avoiding deep copies. Copies structs recursively; copying ends at IVars, Pointers and arrays (ordinary and native). Attempts to choose the two state variables intelligently; if the output location is a variable or has native array type, it is used as one of the state variables, and if the type of the state is scalar, the second state variable is the same as the first one, saving the copy in the loop. Pointed-to data in the state is swapped explicitly between the state variables in the loop. This includes arrays, IVars and the target of Pointers. This is necessary to avoid inadvertent sharing of the pointed-to data between the two state variables.