Fixes #2490: `yii\db\Query::count()` and other query scalar methods now properly handle queries with GROUP BY clause