More cleanup on C API for binCounts() and binMeans().