Fix inArray comparison
Merge pull request #69 from andig/fix-61

Fix inArray comparison for #64
Fix permalink adding entity twice
Merge pull request #70 from andig/master

Fix permalink adding entity twice
Unit test improvements and CounterInterpreter/ MeterInterpreter precision fixes

This patch provides various unit test improvements, enhances code coverage and fixes minor issues with the CounterIntepreter:

Unit Tests:
	- added additional test cases for retrieving last tuple (from=now)
	- added additional test cases for grouped queries (groupby=hour)
	- simplified test code by adding assertHeader, assertFromTo, assertTuple
	- removed JSON output formatting from phpunit.xml

CounterInterpreter->runSQL, CounterInterpreter->processData:
	- Fixed consumption/ average calculation by using MAX tuple value instead of averages tuple value (assumes increasing counter values)
	- 100% unit test code coverage

DataIterator->next:
	- Support CounterInterpreter by returned MAX package value in addition to average

MeterInterpreter->processData:
	- backout part of commit 9a78fe3 that is not needed for MeterInterpreter precision
	- 100% unit test code coverage

SensorInterpreter->processData:
	- synchronized variable naming with other Interpreters

**Note** this patch slightly increases code complexity as Interpreter->runSQL is overridden by CounterInterpreter->runSQL at the benefit of "better correctness". Unit tests for tuple packing/ grouped queries need to fail otherwise.
Avoid duplicate code by adding static::groupExprSQL
Merge branch 'master' of https://github.com/volkszaehler/volkszaehler.org
Add missing ORDER BY timestamp to grouped queries
Merge branch 'master' into travis-aggregate
Made methods static
Added performance test
Added channel-specific aggregation
minor
more tests, better comments
Merge branch 'master' into travis-aggregate
allow uuid override
aggregation logic fixes
Create performance test data