Concatenate arrays without modifying the first array
Introduce test for array destruction

It was discovered that the concat array modifies the arrays passed to it
as an argument as a side effect. This test will ensure that doesn't
happen again.
Merge pull request #306 from hunner/fix_concat

(MODULES-1195) Rebase of #202