local common subexpression elimination

Still missing:
* many  many tests!
* I guess we need fixpoint iteration even for this one?
I'm not sure that would make it more clear if there's only one use site. I've added an explanatory comment instead.