CDH-20478: Fix malformed String.format() and catch exceptions during resource estimation.

Change-Id: I41d632b9026b81c31b4dec9c45f7a30340228e8c
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3628
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Add a query option to control query timeout.

SET QUERY_TIMEOUT_S=30 for a 30s idle query timeout. The maximum and
default query timeouts are both controlled by --idle_query_timeout, if > 0.

Change-Id: I2d2a7fd982cbd7ec34c0496dffa146d8a10adabb
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3617
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
Small fixes for FindRapidJson.cmake

This tiny fix cleans up the FindRapidJson.cmake file, which wasn't
actually searching for the rapidjson.h header correctly but instead
assuming a particular location for it, making some of the other code in
the file redundant.

Change-Id: I5fe3c664b8a078b6610440a8ae4173f38d57a84b
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3631
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins