text: Title: Cleanup ctx manager state management
  Body: ### 🐛 Describe the bug
  
  Today in https://github.com/pytorch/pytorch/blob/bc86b6c55a4f7e07548a92fe7c9b52ad2c88af35/torch/_dynamo/variables/ctx_manager.py#L58
  
  We keep an indirect state object to workaround the previous immutability requirement of VariableTrackers. Since they can now be mutated, we can store the cleanup logic directly on the ctx manager objects. 
  
  ### Error logs
  
  _No response_
  
  ### Versions
  
  N/A
  
  cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames