Make dumpstate listener callbacks synchronous

Dumpstate binder service is oneshot and needs to exit in error
conditions, often right after calling onError. This can make the event
handling on client complex since there could be a race between death
recipient and onError. To make things simpler make onError synchronous.
To keep it consistent make the other callbacks synchronous as well.

Also add a new error code to signal another bugreport is running.

BUG: 123571915
Test: adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test --gtest_filter=DumpstateBinderTest.*

Change-Id: I33f0b3a080ba493dba3521439daa6a46354a8470
(cherry picked from commit e64c3aa814b8cbd62907b8026899533a0f24c8f6)
diff --git a/cmds/dumpstate/tests/dumpstate_smoke_test.cpp b/cmds/dumpstate/tests/dumpstate_smoke_test.cpp
index b5ad699..854ca76 100644
--- a/cmds/dumpstate/tests/dumpstate_smoke_test.cpp
+++ b/cmds/dumpstate/tests/dumpstate_smoke_test.cpp
@@ -474,7 +474,8 @@
                                        Dumpstate::BugreportMode::BUGREPORT_INTERACTIVE, listener2);
     EXPECT_FALSE(status.isOk());
     WaitTillExecutionComplete(listener2.get());
-    EXPECT_EQ(listener2->getErrorCode(), IDumpstateListener::BUGREPORT_ERROR_RUNTIME_ERROR);
+    EXPECT_EQ(listener2->getErrorCode(),
+              IDumpstateListener::BUGREPORT_ERROR_CONCURRENT_BUGREPORTS_FORBIDDEN);
 
     // Meanwhile the first call works as expected. Service should not die in this case.
     WaitTillExecutionComplete(listener1.get());