Palette Merge button should actually modify pixels, as per documentation
The documentation for the Merge button in the palette dialog reads:
Merge: The selected range of colors becomes an average, weighted according to how many pixels use this color. Then all the pixels get replaced by the first color of the range. [...]
The current code did the first part, but not the actual pixel replacement (in bold). Thus, the Merge function did not actually free up any palette entries. This patch adds the pixel replacement.