libfoundation: Fixed bug in array creation from object list.

Cherry-picked from commit 06ab0a944f44.
Merge pull request #1431 from peter-b/misc-arraycreate

libfoundation: Fixed bug in array creation from object list.
Merge branch 'origin/develop' into feature-stackdir
[[ Valgrind ]] Ensure MCStack members get properly initialised.

Prevents use of uninitialised values.
libfoundation: MCStringCreateMutable(): Set length of string to zero.

When MCStringCreateMutable() is called with a non-zero
p_initial_capacity, __MCStringExpandAt() provides a buffer of the
requested length for the __MCString.  However, it also sets the
char_count of the __MCString to the same length.  This can cause the
resulting __MCString to contain arbitrary data.
Merge branches 'misc-mutablestrings' and 'valgrind-mcstack' into develop-7.0

Closes #1432 and #1433.
Merge branch 'develop-7.0' into develop
Merge branch 'origin/develop' into feature-stackdir.