Aperture: Rework gallery button handling

* Rather than storing URIs in shared preferences, use MediaStore to keep
  track of the latest media available.
* Keep track of the photos/videos taken in SecureCameraActivity and
  supply them to the handler of android.provider.action.REVIEW_SECURE
  so that the items may all be reviewed without unlocking the device.
* Prevent multiple instances of SecureCameraActivity from accumulating
  as a result of being returned to the activity from a gallery app that
  utilizes the PendingIntent we provide it.

Test: Manual: Install a supported gallery app, such as Google Gallery
or Google Photos (likely soon, GCamPhotosPreview). Give it the needed
permissions. Launch the gallery from Aperture and ensure the gallery
app is the default. Lock the screen, and double-tap the power button
to enter Aperture. Take multiple photos. Tap the thumbnail. All the
photos just taken should be viewable, but no others. Leave the app or
unlock the phone. Lock the screen and enter the camera again. Take
another photo or two. Tap the thumbnail. Only these photos are shown.

Co-authored-by: Luca Stefani <luca.stefani.ge1@gmail.com>
Co-authored-by: Sebastiano Barezzi <seba@sebaubuntu.dev>
Change-Id: Ieba8a9a23bba50d0125f61e0c3be25f1b818af5c
7 files changed