Adding failing test for DDC-2214

Parameters being bound to an SQL query should have the same type as
the identifier of the objects being bound to the placeholders of a
DQL query - this is currently broken with proxies, as this test
demonstrates.
Merge pull request #693 from doctrine/hotfix/DDC-2214

Adding failing test for DDC-2214