Set paramater order on sort-related routines so that the vector being
sorted/searched/etc. is always first.
Fix order of nans2end.
Allow function arguments as first paramter of sort functions
Sort updates:

* Add sort versions which take Functions as first argument,
  for use with "sort(x) do a..." syntax
* Added (but commented out) select and selectby functions
  for same.
Minor updates.
Fix sort versions which take a function as the first parameter.
Actually make taking a function argument work...
Finish cleanup of allowing function arguments first.

* Added (but did not export) selectby, sortpermby
* select, selectby, and sortpermby can take function arguments first
* Added basic tests
Merge branch 'kmsquire-sort_param_order'

Conflicts:
	test/sorting.jl
some doc updates and un-export the removed trideig
close #2192
Merge branch 'master' of github.com:JuliaLang/julia
close #2133
Merge branch 'master' of github.com:JuliaLang/julia
sorting: move all algorithm & ordering arguments to end [close #2210].

It occurs to me that the algorithm and ordering arguments are now even
more like keywords. Food for thought.
some doc updates
reinstate dfill()
Update documentation for factor(n).
@mbaz submitted this in commit c66a9608f3a752866cca571df1eafaafa3813e42
Merge branch 'master' of github.com:JuliaLang/julia
Merge branch 'master' of github.com:JuliaLang/julia
Update helpdb