Merge pull request #767 from doctrine/DDC-2627

Fixing missing table aliases when using Many2Many persister.
Add support to configure custom persister classes
Makes Query class extendable