delete the top level protocol actor at main thread
use nsRefptr instead of scoped_refptr