Issue #135: CActiveRecord::count() respects group and having

Fixes #135
Now "CActiveRecord::count()" respects group and having.
Unit tests for "CActiveRecord" has been updated. Tests have been passed successfully.