handle duplicate events properly

- The same pattern can be matched multiple times and this led into
  wrong results.
- Rename to _(\d) when the same name already exists.

bug: 37962756
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -f -e 16 -w 30 -v
Change-Id: Ie60fad6e74c08f0062760ec5ff7f799ed5019460
1 file changed