Processor Cache Keys

Implementation for #671.

Processors (engines or transformers) MAY define a method called `cache_key` that returns a static cache key identifying the state of the function. (Method name maybe revised)

/cc @chancancode @elia 
This is all a bunch of copy paste hacks, I'll clean this up once we figure out if the approach is right.