AstRewrite for count distinct can cause unexpected issues with certain queries

Fix is to continue without rewrite under any issues in rewriting. Rewrite only when we can.

The exception below is seen for a single alter table add partition command with multiple partitions.

java.lang.ClassCastException: org.antlr.runtime.tree.CommonTree cannot be cast to org.apache.hadoop.hive.ql.lib.Node
at org.apache.hadoop.hive.ql.parse.ASTNode.getChildren(ASTNode.java:61)
at shark.parse.ASTRewriteUtil$.getChildren(ASTRewriteUtil.scala:57)
at shark.parse.ASTRewriteUtil$.findQueryNodes(ASTRewriteUtil.scala:120)
at shark.parse.ASTRewriteUtil$.countDistinctToGroupBy(ASTRewriteUtil.scala:137)
at shark.SharkDriver.compile(SharkDriver.scala:205)
....