ENH: serialization of categorical to HDF5 (GH7621)