kaplibs: Annul locator after writing palette values

This relies on the memory mapped data being unmapped when the
program exits. Be explicit about freeing resources.