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
@caponica the option 1 is correct, but the most valuable for users is option 3 with clear messages.