Various middleware bug fixes and optimizations

This patch contributes various middleware bug fixes and optimizations, especially when MW tuples parameter is being used:

DataIterator
- value of first record is made available by firstValue() interface, limiting the minimum number of actual records needed for caluculating meaningful values in the various Interpreters

CounterInterpreter
- reduced number of required database tuples for meaningful calculation by using DataIterator->firstValue() 
- fixed consumption and average calculation (previously, edge counter values would be mangled by the data packaging algorithm in DataIterator leading to up to 100% deviation of values generated for tuples=2)

MeterInterpreter
- improved consumption/average accuracy by using DataIterator->firstValue() 

SensorInterpreter
- optical change to align the various Interpreter implementations
- TODO: check potential improvements to consumption/average calculation

DataController
- backwards-compatible change to limit retrieval of data to within the specified from-to interval by adding client=raw to the request

Interpreter
- backwards-compatible change to limit retrieval of data to within the specified from-to interval by adding client=raw to the request
- implemented database tuples to package aggregation in SQL instead of PHP loop if applicable to improve aggregation performance
- tuples packaging in SQL also limits size of first package to 1 row to maintain real data for start of interval

CapabilitiesController
- added database section containing number of records in data table and size of data table (data+indexes in bytes)