ART: Destroy unprocessed tasks in TaskProcessor.

In the past I've seen valgrind complain about leaked tasks
in the TaskProcessor, so make sure we clean up properly.
Also hold the mutex and condition variable directly in the
object instead of allocating separate objects on the heap.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: If0d4ac39bf3d8e2aa9b465186d4fa7c3cb746718
2 files changed