Ensure files get mediascanned after the download is completed.

Update file size in MediaStore to 0 before triggering mediascan
which should force MediaScanner to scan this file.

Also, add a clean-up job to trigger mediscan on already existing
downloads which should have been mediascanned but haven't and got
stuck in this state.

Bug: 138419471
Test: manual
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest DownloadManagerLegacy
Test: atest DownloadManagerApi28
Change-Id: I813086ceba6c70ca42309fcce5f9db209eac1575
6 files changed