Integration test OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest with pgsql

core/Segment.php, function buildWrappedSelectQuery had the 'GROUP BY' clause in the
"log_inner" sub query. Mysql is lenient with these kind of group by clauses where the
non-aggregate function columns missing in the group-by are tolerated; postgresql
throws an error. Removed the 'group-by' clause and converted the 'select' to
'select distinct' to get the same effect.

Modified the tests in the Core group to take into account the changes made to the
queries as mentioned above.