Override MySQL's check for accidental large queries

Bug 1070046: MySQL has an optional server config option, "MAX_JOIN_SIZE",
which throws an error if you try to run a SQL query that MySQL's strategizer
thinks will require it to evaluate more than MAX_JOIN_SIZE rows. This is
intended to prevent the user from accidentally running giant queries that
will never finish, but some Mahara queries (which are large but will finish)
can trip it. Adding SQL_BIG_SELECTS=1 tels it that our queries are *not*
accidentally large.

Also has order change for bug 1184450

Change-Id: I6db4699ea765d3213d13eb93b8de098914db24e0
Merge "Override MySQL's check for accidental large queries" into 1.7_STABLE
Merge branch '1.7_STABLE' of git://gitorious.org/mahara/mahara into sdc_17