[remoting] Increment the context ID counter atomically.