Add retrieveBugreport dumpstate implementation

Adds the native logic necessary for handling the
DEFER_CONSENT flag when calling startBugreport, and
handling the retrieveBugreport API.

When calling startBugreport with the DEFER_CONSENT flag
set, the consent flow will not be invoked. Instead, the
bugreport files will be stored in the bugreport internal
directories and will only be passed to the caller's file
descriptors when the same caller invokes retrieveBugreport
at a later time.

Test: atest CtsRootBugreportTestCases
Test: atest dumpstate_test
Bug: 245328405
Change-Id: I3a46482e173c6084ebda96f08ec60a31953d5f94
8 files changed