Support transfer/relocation when using app locks
Created by: Carrotman42
In order to prevent deadlocks during detach while using application locks in a client, we need a way to pass along the saved mcontext from before a clean call. Without it, the client code waiting to lock a contended lock may never be safe to synch with, and synch_with_all_threads will eventually fail and time out.