adds sort_by function template and uses it in Palette and Quantize

adds:
 * ```sort_by.H``` ... declares/defines function template ```sort_by```

modifies:
 * Quantize.cxx ... to use ```sort_by```
 * Palette.cxx ... to use ```sort_by``` via new anon namespace function
 * Makefile.am ... adds ```sort_by.H``` to ```rendera_SOURCES```