Array.erase (+test and leakchecked) and some other things

fix memory errors on Array.each when the callback edits the array
Introduce ValueMap/ValuePair/ValueVector typedefs
Changed array.cc to use new typedefs to see if we all approve their use