Fix cbf_max calculation

addPalette used cbf_max_ property whereas it's name is cbf_max.

Furthermore, addPalettes now sets cbf_max by itself rather than
calling addPalette with opt_is_cbf argument.  The reason for that
is if opt_cbf_max was 1, but passed palettes did not have a palette
of length 1 or 2, cbf_max would be set to the length of the shortest
palette minus one.  With this change, cbf_max is set to minimum of
opt_cbf_max and cbf_max.
Minor whitespace & formatting fixes
Added README file