Add collectd tests for all metric types

File /tests/collectd-squares.pkts contains captured collectd
packets containing 4 metrics, one for each type. Each series
has the same 10 measurements with 2 seconds interval. The
values of the measurements are i**2 for i in range(10).

Four test functions have been added to check that the values
of the samples are calculated appropriately for each type.
Fix issue with writing str to file in python 3
Fix whitespace issue
Add tests for min/max values in collectd samples

Test that values outside the range defined in types.db are dropped
for all basic collectd types.

These tests currently fail. Even though CollectDTypes parses and
stores the min/max values for each type, the sample's value isn't
checked against those limits.
Collectd types bounds checking

Add a check_range method to CollectDServer to check that the
values fall within the permitted range as defined in types.db.
Fix whitespace issue
Merge pull request #36 from dimrozakis/collectd_bounds

Collectd: Check value ranges according to types.db