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
It 'should be' or it 'will only ever be'? I don't know enough about the class to know how it's used in all circumstances.

Also, I'm not sure how expensive the get_class and substr functions are but happy to add an extra check of the options - so long as it's not going to introduce new edge cases.