CacheManager: Improve UI performance while scanning

Get the list of applications in background thread instead of UI thread.