IMPALA-1148: Do not generate a sort node if the sort tuple has no materialized slots.

Change-Id: If9d55b54a8305798ab68470a4a698d95ef92ce7a
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4176
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins