Massive speedup in sampling from a sample distribution.

Changed from an O(n) to an O(log n) data structure for frequency to byte
lookups. It builds the table on load so it is compatible with the previous
data structure serializations.