constants for default sorts and small sort threshold and algorithm.

This makes it easy to tweak these choices if one wants to do so.
port TimSort to the new sorting framework.
sequester the TimSort implementation details in an inner module.
Merge branch 'master' of github.com:JuliaLang/julia