Optimize recursive copying of arrays, multisets and mappings. We delay the
allocation of the lookup mapping used to quickly process duplicate entries
until we find that the source contains a container with complex data
inside. Another improvement is to not place basic types in the mapping
since they will be copied the same way regardless. Finally, the old code
added complex entries to the lookup mapping twice (both in svalue.c and in
the respective type handler) which was redundant.