Improvements to the hadoop collector.

This change implements two major changes necessary to use the hadoop
collector in a production environment. The first change divides the time
by 1000 as the time reported in the metrics files are miliseconds since
epoch. Without this change the following error is thrown from graphite:
struct.error: 'L' format requires 0 <= number <= 4294967295

The second change included here is a truncation step to the file read.
Without a truncation step the metrics file will grow forever, and each
run will re-read the whole metrics file, sending all the old, as well as
the new metrics to the graphite server. By truncating the file after a
successful read we can stop not only the disks from filling up, but we
can also ensure that we never overload the graphite server by re-sending
massive numbers of metrics. This change is optional, and defaulted to
false in order to maintain current semantics.
postgres: make handling queries against pg_stats (etc) for different vers, more flexible
postgres: add pg_stat_database.temp_files/bytes for pg >= 9.2
added a timer to delay influxdb writes

Added a timer to wait for an incremental time in case influxdb is not responding.
This will stop the 100% CPU usage of diamond when influxdb is down.

Instead of calling the _send() each time the batch size is reached (as it will occure for EVERY new metric gathered in case of failure), the function is called only when :
1) the batch size is reached
2) the last _send() request was done X seconds before

X is 2s in normal operation, and is rooted by 2 each time, so first write is after 2s, then 4s, then 8s, 16s and 32s, which is the max.
During this time, the metrics will stay in memory. if more than self.metric_max_cache metrics are stored, stop recording them. 
I did it this way as the array of metrics is multi-level, indexed by its path and we can't easily know how many values are in each path and which one to remove to trim the cache...
This will work AS LONG AS the batch size is less than the cache size, which should always be the case anyway...
changed time_precision from m to ms

influxdb changed the value for the miliseconds time precision from 'm' to 'ms'
gather monit totals memory and cpu metrics if send_totals = True
Add per-collector ability to whitelist/blacklist metrics

- Configured with keys metrics_whitelist and metrics_blacklist
  to the collector's section in the config file
- Keys aren't regexes, straight strings that are comma separated
- Providing both a whitelist and a blacklist will result in an
  exception being thrown
PEP8: Fixes for ELB collector + tests

Now the entire repo passes PEP8!
exim: Allow collector to sudo as any user

Ideally, you would sudo as exim to read the number, not as
root. The defaults are kept as root for backwards compatibility.
Use a regex for metrics_blacklist and whitelist
Add precision to the httpd collector for ReqPerSec BytesPerSec BytesPerReq
Remove unnecessary for loop.
Also collect heap_used_percent - so one can see how close to the limit one is.
Merge pull request #665 from liquidgecka/master

Improvements to the hadoop collector.
Merge pull request #668 from prune998/patch-2

added a timer to delay influxdb writes
Merge pull request #669 from prune998/patch-3

changed time_precision from m to ms
Merge pull request #670 from piavlo/master

gather monit totals memory and cpu metrics if send_totals = True
Merge pull request #673 from yuvipanda/pep8-elb

PEP8: Fixes for ELB collector + tests
Merge pull request #674 from yuvipanda/exim-sudo-user

exim: Allow collector to sudo as any user
Merge pull request #672 from yuvipanda/whitelist

Add per-collector ability to whitelist/blacklist metrics