renderer: improve cache invalidation and single frame caching
The current cache invalidation logic was slightly too aggressive in some regards, for example also triggering on changes to info_callback or dither_params. In addition to fixing this, also overhaul the params hashing code to also provide a best effort estimate of whether or not the pass is worth caching at all. If not, just skip it if possible.