First draft of a tree structured palette.
Modified meadian cut to use it.
Also a change to the Palette interface, Index removed.