Cleanup code around recording method trace events

There are three cleanups in this CL:
1. Merge streaming_lock_ and unique_methods_lock_. unique_methods_lock_
   is used to prevent concurrent access to method->id map. In streaming
   mode we only access that with streaming_lock_. So an additional lock
   isn't required to protect these. In non-streaming case we never need
   a streaming_lock_. So we can merge these and rename streaming_lock_
   to tracing_lock_.
2. Remove seen_methods_. We already have a method->id map to check if a
   method was already seen or not. Additional bookkeeping isn't required
   there.
3. Pass in TraceAction directly when logging method trace event.

Bug: 259258187
Test: art/test.py
Change-Id: I240d2698ae0f72ad99b0b362022655e13059f16e
2 files changed