AImageDecoder: ensure that stride is pixel aligned

Bug: 147749998
Test: I902de3410c45a21cf27b48a02cdc5d514b7ada60

If the client uses a stride that is not pixel aligned, AImageDecoder
will crash internally trying to access the memory. Return a failure
instead of crashing. Rely on SkImageInfo to compute the minimum size
required, too.

Change-Id: Ia4d14d6209e6f4af74906ff43208fa83ac82cbcd
1 file changed