Improvements for ordering in custom exports

http://manage.dimagi.com/default.asp?86347#695228
I ripped this section out because with new sorting alghoritm in javascript I think it will be simply ignored and all sorting will be executed by columns.sort in line 199