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 calculating 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)
Added child data to aggregate channels in data context
Allow uuid to be array parameter uuid[] for adding/deleting channels form aggregator
Fix typo in array identifier
Add support for retrieving multiple UUIDs in data context
Added support for uuid[] array as request parameter for aggregate and data context
Added support for uuid[] array as request parameter for data context to retrieve multiple channels with single request
Fix static class member call
Added capability to add multiple tuples to multiple channels via JSON post to data context
Merge pull request #47 from andig/master

Various middleware bug fixes and optimizations