Return proxy query instead of doctrine query builder

I have created a new pull request because I couldn't get the commits squashed.

This was also fixed in doctrine orm a while ago: 
https://github.com/sonata-project/SonataDoctrineORMAdminBundle/commit/e143a23c528d80241f7f186a997386854fc7d759 

This was required to make the admin extensions work for mongodb admin.

I fixed the instanceof check in executeQuery() too.