Avoid leaking cursors

Adding try/finally blocks to make sure that cursor
resources are let go

Change-Id: I596074aa9ab5752f91a26b5a03e1f39c23c64a5f
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_packages_providers_DownloadProvider into kk4.4