* [backport] Fix CPU bin compression with categorical data. (#8809)
* Fix CPU bin compression with categorical data.
* The bug causes the maximum category to be lesser than 256 or the maximum number of bins when
the input data is dense.
* Avoid test symbol.