fix: Deadlock with closing process manager (#6516)
### Description
There was a deadlock where we were holding a RwLock across an await
boundary, which causes a deadlock. Solved it by making sure the handle
is dropped before the await.
### Testing Instructions
Adds a test by @chris-olszewski
Closes TURBO-1723
---------
Co-authored-by: nicholaslyang <Nicholas Yang>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>