Fixed #68024 #68171 #60387

Bugs: [68024](https://bugs.php.net/bug.php?id=68024), [68171](https://bugs.php.net/bug.php?id=68171), [60387](https://bugs.php.net/bug.php?id=60387)

Instead of prepending key/value pairs into a linked list, we maintain
a head and tail for the three array config buckets so that operations
take place in the correct order *and* existing values can be
overridden.
`malloc` -> `calloc`