IMPALA-1378: Only debug FunctionContexts track each user allocation

Maintaining the map of user allocations in FunctionContext is very
expensive (I measured a group by query going from ~11s to ~6s by
removing the map), and is only used for diagnostic information. This
patch changes the FunctionContext to only maintain the map when run
via the UDF test harness. It also adds basic allocation tracking to
FreePool to detect memory leaks and double frees during regular
execution.

Change-Id: Ia3e6e0229f9bcb227c6b5c3a21d2774bbe092fe6
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5314
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins