IMPALA-962: Fully qualify table and view names in toSql().

Change-Id: I6bf757c4ffbaf82c136af7b59d2d415234545a86
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2373
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins