Don't track free variables in STG syntax by default
Currently, CoreToStg annotates StgRhsClosures with their set of non-global
free variables. This free variable information is only needed in the final
code generation step (i.e. StgCmm.codeGen), which leads to transformations
such as StgCse and StgUnarise having to maintain this information.
This is tiresome and unnecessary, so this patch introduces a trees-to-grow-like
approach that only introduces the free variable set into the syntax tree in the
code gen pass, along with a free variable analysis on STG terms to generate
Fixes Trac #15754.
Reviewers: simonpj, osa1, bgamari, simonmar
Reviewed By: osa1
Subscribers: rwbarton, carter
GHC Trac Issues: Trac #15754
Differential Revision: https://phabricator.haskell.org/D5324