WIP: Fixing associations using a value-conversion type as identifiers

This is a port of #1174.

I was running an experiment using a custom DBAL type, which converts a UUID string (in PHP) to 16 bytes binary string (in SQL) and vice versa, as identifier for a couple of entities. I noticed some associations weren't loaded correctly. This PR attempts to fix that issue.

__Remaining issue__

There are 2 tests that involve OneToOne and OneToMany associations with composite ids of which one is a foreign one. When the owning side is fetched from the DB, a Proxy object is created for the inversed side. But this Proxy contains incorrect identifiers:

    public $id => string(36) "12345678-9abc-def0-1234-56789abcdef0"
    public $foreignEntity => string(16) "????????????????"

Those question-marks represent 16 bytes of binary data. The thing is that `$foreignEntity` should contain another Proxy object (or perhaps the UUID of the foreign entity, I'm not sure).

I'm at a loss here :( Hopefully someone can point me to where identity through foreign Entities is managed!

This is the same behavior as it was when the code lived in `Doctrine\ORM\Persisters\BasicEntityPersister::getValue()`, but I do think you are correct. I've adjusted this.