PERF: optimize storage type for codes in Categoricals (GH8453)