Delete tasks when deleting a thread pool.
am: 714fad6575

Change-Id: Id9306f8728eac679195508e0bdb8938f7ceeddf8