IMPALA-330: Use R/W lock to protect path-handlers in webserver

Change-Id: I62027e015bbb4e1e3b4a8a6ca6eaa612b3a9fc57
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1650
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
IMPALA-828: Fix avro codegen if conjuncts cannot be codegend.

Change-Id: I9ff0214e541eb958132fbe5b7798883db91ef025
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1685
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
Changes necessary for expr refactoring

This is some fairly mechanical refactoring that will be necessary for
the expr refactoring branch. It introduces the following changes:

- lookupSymbol() is moved from CreateFunctionStmtBase to Function
- HdfsFsFache and HdfsLibCache are removed from ExecEnv and made into
  standalone singletons
- Various 'is_fe_tests' variables are consolidated into one variable
  that is initialized early

This is paving the way for having the FE call into the BE on startup
to resolve builtins' symbols. The general idea is to simplify the
order various services are created, by having classes with fewer
dependencies initialized first.

Change-Id: I5d0e1325792a53680a9738e2e3e67fed6201299c
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1612
Tested-by: jenkins
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
IMPALA-749: Fetch partitions in batches, rather than all at once.

This updates how Impala fetches partition metadata from the Hive Metastore to fetch
partitions in batches, rather than all at once. This helps reduce the load on the
HMS and also lets Impala scale to above 32K partitions. The downside is that it
may require additional RPCs to get all the partitions.

This is done by first querying the metastore to get all the partition names that
exist, then splitting the list of names into seperate batches to get the actual
partition metadata.

Impala uses a default size of 1000 partitions per batch, but it can be configured
by setting the 'hive.metastore.batch.retrieve.table.partition.max' parameter
in the hive-site.xml config file.

Change-Id: Ide0ec30ef8a9e00f79c26551aa8e5e7814c73034
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1662
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Tested-by: jenkins
IMPALA-820: Register Having-clause predicates with analyzer after expr substitution.

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