Throttle the creation of threads in Debouncer (again).

http://r.android.com/2887708 throttled the creation of
ScheduledExecutorService, but it didn't actually throttle the creation
of threads because we were using the ScheduledExecutorService created by
Executors.newSingleThreadScheduledExecutor(), which has a surprising
behavior that it destroys the single thread when the last task is
cancelled, and re-creates it when a new task is scheduled.

After this change, we use the ScheduledExecutorService created by
Executors.newScheduledThreadPool(1 /* corePoolSize */) instead.

Bug: 317234694
Test: -
  1. Capture a trace starting from right before `adb shell start` with
     `--duration 120` and `-e sched:sched_wakeup_new`.
  2. See only one thread creation initiated by "notifyDexLoad" (https://pprofng.corp.google.com/?id=721c44e87ff38dff14d4a6e7d6e1c010&pivot=%5Ecom%5C.android%5C.server%5C.pm%5C.PackageManagerService%5C$IPackageManagerImpl%5C.notifyDexLoad$)

Change-Id: I21bd9040c1cf2508b3912236a25522f9bfb8e39f
1 file changed