Fixe Oracle Pagination bug when ordering is present (e.g. Oracle subquery ordering)

See http://www.doctrine-project.org/jira/browse/DDC-1800 for a full description of the problem.