Add support for releasing Module at the end of GenerateBuildActions

Calling FreeModulesAfterGenerateBuildActions marks this
module as no longer necessary after the completion of
GenerateBuildActions, i.e. all later accesses to the module will
be via ModuleProxy and not direct access to the Module.

Test: some soong tests pass when cc modules  call FreeModuleAfterGenerateBuildActions
Change-Id: Iccae10e2e450c388de4a4d1dd121289a08be4a31
3 files changed