AssetManager cookies should be int32_t and not void*.

Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.

(cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7)
(cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215)
(cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd)

Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda

Conflicts:
	include/androidfw/AssetManager.h
Change ResourceType cookies to int32_t.

Also change the order of parameters in ResTable constructors
to avoid ambiguity.

(cherry picked from commit 00b314436f4fdfada4bbf1e79ec12e9fa38aeaf1)

Change-Id: I874c5d03c134dc3c331fba423b5280366296287c

Conflicts:
	include/androidfw/ResourceTypes.h
	libs/androidfw/AssetManager.cpp
	libs/androidfw/ResourceTypes.cpp
Fall back to "tl" if "fil" is absent.

For JB-MR1, there was a hack that used "tl" where
we really meant "fil" because ICU didn't have localizations
for "fil". This has now been fixed, and we now support 3 letter
language codes for AAPT so we can use "fil" where required.

For the benefit of apps that need to target older platforms,
we fall back to "tl" if the app has assets for "tl" and the
resource locale is "fil".

See bugs 7291355, 7207176 and 8049507 for more context.

Change-Id: I1ac8502525f99b40f9091d5efd2df33518d47a41
Fix issue when converting fil->tl.

We should call ResourceTable::getLocales directly,
and not AssetManager::getLocales. The latter will convert
"tl" to "fil" so we'll end up thinking we have resources
for "fil" when we don't really have any.

bug: 15873165

Change-Id: I9753e4608aaecede328a40ee1f3ee6b016d0dedc