[SPARK-1852] prevents queries with sorts submitting jobs prematurely

JIRA issue: [SPARK-1852](https://issues.apache.org/jira/browse/SPARK-1852)

This issue is related to [SPARK-1021](https://issues.apache.org/jira/browse/SPARK-1021), but this PR doesn't try to solve that one. Worked around by only forcing query planning when running DDL and other native commands.