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
(cherry picked from commit c030b678425b83c42e074d45d4a245adccb6e0ae)
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3482
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>