Select Limited Ids List patch

From the added test: `Post.find(:all, :include => { :authors => :author_address }, :order => ' to_char(author_addresses.id, \'99\') DESC ', :limit => 2).size`
This is the invalid query that gets executed: 
```sql
SELECT * FROM 
	(SELECT DISTINCT ON ("posts".id) "posts".id
		, to_char(author_addresses.id AS alias_0, '99') AS alias_1 
	FROM "posts"  
	LEFT OUTER JOIN "categorizations" ON ("posts"."id" = "categorizations"."category_id")  
	LEFT OUTER JOIN "authors" ON ("authors"."id" = "categorizations"."author_id")  
	LEFT OUTER JOIN "author_addresses" ON "author_addresses".id = "authors".author_address_id ) AS id_list 
ORDER BY id_list.alias_0 , id_list.alias_1 DESC LIMIT 2
```

The problem is that activerecord splits the ordering by commas. But there are commas in Postgres functions that are allowed in the ordering. 

[Reported here as well](https://rails.lighthouseapp.com/projects/8994/tickets/6548-activerecord-238-bug-on-find-with-include-order-limit-and-coalesce)