Fix identifier quoting on Oracle/Postgres

This fixes issue #885
Oracle and Postgres (at least) don't like to have quoted alias when trying
to group by them. This fix gets around the issue by quoting only identifiers
that have a space/dot in them.
just change it back and commit. you can squash the commits afterwards, when the PR contains everything required.

you can read the docs of symfony, which mostly match for propel
http://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request