Add tests for AImageDecoder

Bug: 135133301
Bug: 139124386
Test: This

Add AImageDecoderTest.java and its native counterpart for testing the
APIs of AImageDecoder.

Add Utils.java for sharing code between different tests.

Move BitmapFactoryTest#obtainPath into Utils.java

ImageDecoderTest:
- make various methods and classes package-private so they can be used
  by AImageDecoderTest.
- Add Record.isGray and (Asset)Record.hasAlpha and a grayscale Record to
  exercise AImageDecoder features.
- Move getAsResourceUri into Utils.

Change-Id: Ib84462ea5fa8a7779eaa44494775e182e52ecaca
7 files changed