Hotfix: Changed array_walk to foreach in Zend\Stdlib\Hydrator\ArraySerializable

The data array is manipulated while traversing it. This does not work
with array_walk.

http://www.php.net/manual/en/function.array-walk.php
> Only the values of the array may potentially be changed; its structure cannot be altered, i.e., the programmer cannot add, unset or reorder elements. If the callback does not respect this requirement, the behavior of this function is undefined, and unpredictable.

This will fix #4258