Work on issue #5465917: Wakelock *overflow* held for very long times

- Fix ordering problem in sync manager that would cause its wake
  locks to slightly appear in the system process when they should
  be fully accounted against the app.
- Allow the system process to have more wake lock names in its
  battery stats.
- In the bug report output, print totals of the wake locks for each
  process, to make it easier to parse what is being printed for things
  like the system process with a huge number of individual wake locks.

Change-Id: I3cf39330f22f3c51c11e65e4124150d73a7da2dd
3 files changed