Add priority based dumpsys support to dumpstate

Adds a new version of dumpstate which calls dumpsys with different
priorities. Current version will remain INITIAL_VERSION (1.0) until tools
support the new version and services register with supported priorities.
Modified dumpsys to pass prioirty args to services.

BugReport format changes:
- removed service specific dumps and dump order changed
- Start of dumpsys section changed to
  DUMPSYS CRITICAL/HIGH/NORMAL
- Start of service dump changed to
  DUMP OF SERVICE CRITICAL/HIGH/NORMAL <servicename>

Bug: 27429130

Test: adb shell setprop dumpstate.version "1.0" && \
            adb bugreport ~/tmp_old.zip
Test: adb shell setprop dumpstate.version "2.0-dev-split-anr" && \
            adb bugreport ~/tmp_anr.zip
Test: adb shell setprop dumpstate.version "2.0-dev-priority-dumps" && \
            adb bugreport ~/tmp_new.zip

Change-Id: I9fd0f2d0e6d73b36cc8ee0f8239092ce83da9560
6 files changed