Fix delete uncalled bugs
Fixes two bugs related to delete uncalled:
- Functions which are going to be deleted should not be edited to update the call sites since they main contain calls to functions that are also going to be deleted and so have no new Function ID.
- Fix to updating the pass manager's environment; the environment's map contain variables with no bindings and hence no associated scopes (this can arise from running delete uncalled twice but also from variables just going out of scope).