Fix the interaction between projection, sort, skip and limit

For regular projection, we do the following:
- We project so that aliases can be used in ORDER BY, per the
contract introduced by the new hoister rewriter
- sortSkipAndLimit
- Project again if necessary to hide the fresh names introduced
  by sort for the purposes of caching expression values