simpleperf: refactor event_type.cpp.

Currently simpleperf collects all event types at initialization,
including scanning tracefs to get tracepoint events. It takes
about 50ms and most event types are not used.

This patch refactors event_type.cpp, adding EventTypeFinder classes
for different type sources. And each finder supports two operations:
1. get all event types.
2. find an event type by name.

Then TracepointSystemFinder doesn't need to scan tracefs to find a
tracepoint event type.

Also add EventTypeManager to manage event type finders.

This reduces prepare recording time from about 68ms to 20ms on flame.

Bug: 166335356
Test: run simpleperf_unit_test.

Change-Id: I8379cb5e59ba68509de0d5116f2493eb038fea17
10 files changed