cmake: Add stuff to detect newer librest version
Move the icon render code into a separate .sh file

... which removes the nasty dependency on some lib providing
librsvg-convert.