Fix threadExecutor issue.

Close ExecutorService after use. Use future to capture the exception
thrown from callable that runs in a separate thread to prevent
a test failure from crashing the whole test suite.

Test: Presubmit. Manually test exception behavior verify the test
module is not crashed and test failure is reported.
Bug: 397495394
Flag: EXEMPT cts fix

Change-Id: I0d512e9627e0d36457e78cb97c45a31d203f0c28
1 file changed