ui/android: Fix Resource meta-data sharing with ResourceManager.

The android native resource management system provides a
ui::ResourceManager::Resource, which pulls data from the java Resource,
to provide meta-data to the code building cc::Layers for drawing this
resource.

The resource exposes padding and aperture, which are well defined
concepts for a nine-patch bitmap, but are arbitrarily set in all other
cases. In static bitmaps they are set to the bitmap size, while for
dynamic resources they could represent anything.

The change pulls out a native Resource class which is a container for
the UIResource built from the corresponding java resource. The java
Resource API now has a method which lets it build its native
representation that can hold the meta-data to be used for drawing it
using a cc::Layer. Currently we still build a NinePatchResource for
dynamic resources, follow up changes will fix that to add correct
native Resource subclasses.

BUG=700454

Review-Url: https://codereview.chromium.org/2746483003
Cr-Commit-Position: refs/heads/master@{#457655}
30 files changed