IMPALA-1009: UDF/UDA leaks should not fail queries

With this change, leaky UDFs built with the SDK will still fail when
using the test harness, but leaky UDFs running in Impala will only
trigger a warning. This change also updates the test infrastructure to
always check for non-fatal errors/warnings.

Change-Id: I5615349b9d691e4eddea3e03e152ef12e73835e7
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2844
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
Fix going over the process limit due to tcmalloc hoarding memory.

Users have reported that impala will go way over the process mem limit causing
the system to swap and become unusable. Our code tries to prevent this by checking
the mem limit for large allocations based on the current values in the mem tracker.
However, the values in the process tracker is not aware of the memory still being
used by tcmalloc making this check ineffective.

I ran some experiments just allocating from tcmalloc and I don't think it has high
overhead on any allocation (e.g. if you allocate 1GB, it does not allocate significantly
over 1GB). It does seem to hold onto the memory after frees though. This patch
adds some additional logic for frees of a big enough size to try to mitigate this.

Change-Id: Iad09e3da662b1daf5005e2a4b7f3afb6535e8303
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2915
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins