Avoid unnecessary memset when allocating array literals.

This completes the merge of pull request #294. Thanks a lot to
Chris Holdsworth who originally wrote the patch!

GitHub: Fixes #294.
GitHub: Fixes #141.
Merge pull request #335 from klickverbot/avoid-unnecessary-memset

Avoid unnecessary memset when allocating array literals.