Make JVMTI DisposeEnvironment and GetEnv thread safe.

Previously we were relying on the mutator lock to keep these safe but
it turns out this was not sufficient. We give the list of active
jvmtiEnv's it's own lock to synchronize access.

We also changed it so that during events we would collect all the
environments and callbacks prior to actually calling any of them.
This is required for making sure that we don't hold locks across user
code or potentially miss any environments. This does have implications
for when one is last able to prevent an environment from getting an
event but since the spec is vague about this anyway this is not an
issue. Doing this required a major re-write of our event-dispatch
system.

Test: ./test.py --host -j50
Test: ./art/tools/run-libjdwp-tests.sh --mode=host
Bug: 69465262

Change-Id: I170950db6c6e43b5f3c8bdca1b8d087937070496
19 files changed