Fixed problem with ModelToIdPropertyTransformer and ArrayAccess entities

Updated ModelToIdPropertyTransformer to work with entities that implement \ArrayAccess 
Added FooArrayAccess class to allow testing of new code
See #2301
Are you saying to change it to:

    // Option 1
    if ($this->multiple) {
        $collection = $entityOrCollection;
    } else {
        $collection = array($entityOrCollection);
    }

Or to:

    // Option 2
    if ($this->multiple) {
        if (substr(get_class($entityOrCollection), -1 * strlen($this->className)) == $this->className) {
            throw SomeKindOfException();
        } elseif ($entityOrCollection instanceof \ArrayAccess) {
            $collection = $entityOrCollection;
        } else {
            throw SomeKindOfException();
        }
    } else {
        $collection = array($entityOrCollection);
    }

Or to:

    // Option 3
    if ($this->multiple) {
        if (substr(get_class($entityOrCollection), -1 * strlen($this->className)) == $this->className) {
            throw SomeKindOfException();
        } elseif ($entityOrCollection instanceof \ArrayAccess) {
            $collection = $entityOrCollection;
        } else {
            throw SomeKindOfException();
        }
    } else {
        if (substr(get_class($entityOrCollection), -1 * strlen($this->className)) == $this->className) {
            $collection = array($entityOrCollection);
        } elseif ($entityOrCollection instanceof \ArrayAccess) {
            throw SomeKindOfException();
        } else {
            $collection = array($entityOrCollection);
        }
    }

Let me know and I'll update the PR.