Improve metric summarization performance under heavy load

When computing summary metrics, gmetad's current behavior is for
each cluster thread to grab the summarization lock, peform all of
its summarization, and then release the lock. This can block the
global aggregation thread if a single cluster is taking a long
time to summarize its RRDs for whatever reason; this issue
manifests are dropouts in the cluster and grid summary RRDs. This
also comes up if you have a large number of large clusters which
each take a long time to summarize.

The change here is to have each cluster thread perform its
summarization into a "pending" hash table independently, and then
once the summarization is complete each thread 1) grabs the lock,
2) swaps in the finished pending hash table with the fully-
aggregated one, and then 3) releases the lock immediately.
This significantly reduces the amount of time that the
summarization lock is held by each cluster thread, and also
eliminates the possibility of a single blocked cluster thread
preventing all summary metrics from being written.
Merge pull request #94 from satterly/master

Reduce CPU utilisation of gmond running in deaf mode
Add configurable graphite path. Fixes issue 87

Deprecate the "graphite_prefix" attribute in favor of "graphite_path"
which is configurable via macros (%s %m %h). Sane defaults ensure that
existing configurations are not broken by this change. This should solve
issue 87 and any future needs in its general direction. I've moved code
relating to graphite and memcached from rrdhelpers.(c|h), to
export_helpers. This is housekeeping that reflects how those features
should have been implemented in my original ganglia patch.
duh
fix the memcached parameters I somehow clobbered
Merge pull request #99 from djosephsen/graphite_path

Add configurable graphite path. Fixes issue 87
Added support for mountpoints with underscores in the path (e.g. /mnt/backup_drive)
Uses a single UDP socket for forwaring all metrics
instead of creating a TCP connection for every
metric sent.

Note: UDP listener is off by default. To turn it on
modify carbon.conf like so:

    [cache]
    ENABLE_UDP_LISTENER = True
Treat sFlow-MEMCACHE mc_bytes as gauge rather than counter.
Merge pull request #102 from sflow/master

Treat sFlow-MEMCACHE mc_bytes as gauge, not counter.
Merge pull request #101 from satterly/feature/gmetad-carbon-udp

Forward metrics to Graphite using UDP carbon protocol
Merge pull request #100 from skemper/master

Add support for mounts on underscored paths
Make gzip output for TCP accept channels configurable per TCP accept channel and
not global. This is to make it more consistent with the reset of the configuration.
Also allows mix and matching TCP accept channels if a user desires. Default is disabled.
To enable set

gzip_output = yes
Need to remove gzip options from the command line
Add couple useful but commented out options to default config. Such as

buffer = for udp
override_hostname
gzip_output
Merge pull request #92 from comptonqc/patch-pending_summary

Improve metric summarization performance under heavy load
Merge pull request #103 from vvuksan/master

Move gzip output into tcp_accept_channel and better conf file documentation