Cache codegen'd expr functions

Change-Id: Ie0d5ab2a21cc7b0f3c7f7d239f1129f2bc18ba9e
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3475
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
Fixes for sporadic build failure in compute stats cancellation.

The root cause of the problem was that columns of a Table were not
added to the colsByName_ map with lower case keys on the Table.load() path
that is only exercised by the catalog server (the Impalads "load" tables
via Table.loadFromThrift() which did the right thing).

The above led to an empty column stats object being sent to the HMS
after an otherwise successful compute stats.

The problem was sporadic for the following reasons:
1. Only certain file formats like avro/snap/block have uppercase
   column names in the HMS because the table was created by Hive
2. Some of our tests executed via run-tests.py, notably the
   cancellation tests, aren't deterministic in which test vectors
   are executed in a particular run. As a result, we only see the
   cancellation test run compute stats on an avro/snap/block
   once in a while (this behavior is unaffected by this patch).

This patch includes other minor bugfixes and simplifications
related to compute stats.

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