Expose AnimatedImageDrawable

Bug: 63908092
Test: I85979ae3d8c6a6dae6e4299dc3be291e12024290

Implement Animatable2, adding listeners for starting and ending the
animation.

Add setLoopCount for changing the loop count.

Add the ability to inflate from XML, by using the name of the class or
"animated-image", which mimics "nine-patch", "bitmap" etc.

Move internal variables to a State class so that they can be transferred
to a default constructed AnimatedImageDrawable.

Change-Id: Ice8149e7de55f7ffb4b4ba9dd9c856582fc42bc9
11 files changed