CSE over ANF

This is part of the work we did last week to lower our nested IR to a form of ANF, so that we can do CSE better.  The codegen part will follow later.  PTAL @dpino and @kbara