Extract the construction of count distinct expression into its own method

This is a small refactoring (no changes in behavior) allowing concrete implementations of ERXSQLHelper class to provide their own mechanism to construct the SQL expression to count distinct rows. The default implementation doesn't support composite primary keys. Concrete implementations of ERXSQLHelper may override the `sqlForCountDistinct` method to change this behavior according to each database syntax.