added median-cut pallete generation algorithm using priority queue