huffman: allow specifying nb_bits to ff_huff_build_tree()