Clean up resolution of table and view references.

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