IMPALA-795: Update getTCatalogObject() to take function database into account

We're still concurrently using and dropping UDF libraries in our tests
because we're not correctly resolving the database of a dropped
function, causing the wrong library to be dropped and impalad to
crash. This patch fixes Catalog.getTCatalogObject() to actually use
the database when getting the function.

Change-Id: I3a61625a0e8f23a7989517be6cfa3724b028da91
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1563
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins