[SPARK-3994] Use standard Aggregator code path for countByKey and countByValue

See [JIRA](https://issues.apache.org/jira/browse/SPARK-3994) for more information. Also adds
a note which warns against using these methods.
Note that we still don't support arrays, but this is caught by combineByKey:
`org.apache.spark.SparkException: Cannot use map-side combining with array keys.`