ArrayIterator fixes and unit tests

This fixes a few things:

 * Appending array elements with `[]`
 * `valid()` might report incorrectly if an element value was `false`

It leaves the following behaviors in place:

 * `offsetExists()` simple calls `isset()`, so it can't differentiate between offsets not existing and existing but with a `null` value. There isn't a good resolution for this (see: [this php.net bug report](https://bugs.php.net/bug.php?id=41727)).
 * `offsetGet()` will return `null` even if the offset doesn't exist. Keeping this in place for BC, but I think the proper behavior would be to error out.