allow usage of zend-qsort in user sorts with a runtime option

uasort/usort don't impose a strict order, and because HHVM and PHP use a
different sorting algorithm this means that in some cases we can end up
with different results.

This commit allows us to fall back to standard zend qsort behavior
(which is used by Array::sortImpl) when doing sorting through user-defined
compare functions.

More information can be found in an earlier (incorrect) pull request:
https://github.com/facebook/hhvm/pull/2484#issuecomment-42093840

If you have any questions, @paroski should be able to clarify.

Fixes 5 zend tests, and closes the following github issues:
Closes #2484.
Closes #2416.
Closes #1781.