FIX Remove unnecessary DISTINCT from ManyManyList->removeAll()

Breaks Postgres if the innermost query has an ORDER BY statement as well
Correctly quote SQL in SQLQueryTest (fixes Postgresql)
Clearer docs on where SQL strings are expected to be escaped already

Also quoted some phpdoc examples, to avoid them failing by default on
stricter DB drivers like Postgres
FIX Consistently quote orderby in DataQuery->ensureSelectContainsOrderbyColumns()

Otherwise aggregate queries through DataQuery->column() fail unless the
passed in field is specifically quoted already. This fixes ManyManyListTest->testRemoveAll()
Consistently quote DataObject::$default_sort

Strictly speaking, no longer required since we auto-quote simple
field names in DataQuery now, but since the majority of sorts in core is
already quoted we should stay consistent.
FIX Empty fields on SQLQuery->aggregate() with alias

Breaks Postgres otherwise, because it produces a
"SELECT *, <field> ... " statement without putting all
fields into the GROUP BY.
Merge pull request #1352 from chillu/pulls/postgres-fixes

Postgres fixes