auto BuildAndEncodeHistograms(const HistogramParams& params, size_t num_contexts, std::vector<std::vector<Token>>& tokens, EntropyEncodingData* codes, std::vector<uint8_t>* context_map, BitWriter* writer, size_t layer, AuxOut* aux_out) -> size_t