fixed #1422 order by at outer select vs weight
added regression to test 171

git-svn-id: http://sphinxsearch.googlecode.com/svn/trunk@3676 8b96e2b9-35c5-2c16-bc47-5122d61876d4