Fix unstable unittest due to RejectedExcecutionException

Symptom:
Sometimes RejectedExecutionException is thrown
when FileCopyUiTest and FileDeleteUiTest happens.

Root cause:
When too many files are created by
DocumentsProviderHelper#createDocument() method,
too many root refreshes are queued in an executor.
Then, it causes to throw RejectedExcecutionException.

Solution:
Set a flag to prevent many refreshes.

Bug: 72202303
Test: Unittest of com.android.documentsui.tests
Change-Id: Ia92e37f8e8c31d810f81fee761441c88e8635f13
2 files changed