Stdlib\ArrayObject & Zend\Session\Container Compatibility with ArrayObject

As noted in #3831 for non-object types; this is not currently handled correctly; this resolves it.