Fix some TimerTest flakiness.

There's more flakiness around here, but this is a start. I'm not sure
what we should do with the tests that test how many times a task
has been executed in a given period, so I've left them for now.

Bug: 7766472
Bug: 7745085
Bug: 7740706
Bug: 6896554
Change-Id: I84d8aa036c075024d5cefdad050884762eab50a3
FileChannelImpl: Ignore ftruncate failures on non-regular files

Truncate only works on regular files.  On other files, such as
UNIX character devices, truncate returns EINVAL, which
causes an IOException to be thrown.

With this change, we now have support for creating a MappedByteBuffer
on UNIX character devices such as /dev/zero, if the underlying
device node supports mmap().

Change-Id: I094371d821b187abe3da32edc411ff76a81b047e
Fix X509Certificate.getBasicConstraints implementation for DRLCertFactory

Change-Id: I5d1ba078b0f8f9ec8e2950e0da02481e8162a5e6
Track redundant ops when opening the cache.

See https://github.com/JakeWharton/DiskLruCache/issues/28

Change-Id: I4815aed3b40f0d2599ff12a42853a4947feffbca
NativeCrypto: RSA fields cannot be NULL

If an RSA field is left NULL, it will not be represented in the ASN.1
output of the RSAPrivateKey. This leads to problems trying to recreate
the key since it does not emit the NULL fields and the fields are not
numbered.

Bug: 7920357
Change-Id: I144302925f9b080a2152a6d12f77981b3aad9495
Improve our time zone name collection.

A variety of bugs here. We weren't using dates in the current year,
we were assuming that icu4c has correct time zone transition data (it
usually doesn't), and in the fallback code (which we'd previously
never hit) we weren't honoring the caller's request for standard/daylight
time.

This patch fixes:

         Africa/Tripoli: long='Eastern European Standard Time' short='Eastern European Standard Time'!
      America/Araguaina: long='Brasilia Standard Time' short='Brasilia Standard Time'!
   America/Campo_Grande: long='Amazon Standard Time' short='Amazon Standard Time'!
         America/Cuiaba: long='Amazon Standard Time' short='Amazon Standard Time'!
         America/Havana: long='Cuba Standard Time' short='Cuba Standard Time'!
       America/Santiago: long='Chile Standard Time' short='Chile Standard Time'!
      America/Sao_Paulo: long='Brasilia Standard Time' short='Brasilia Standard Time'!
      Antarctica/Palmer: long='Chile Standard Time' short='Chile Standard Time'!
         Asia/Jerusalem: long='Israel Standard Time' short='Israel Standard Time'!
            Asia/Tehran: long='Iran Standard Time' short='Iran Standard Time'!
          Asia/Tel_Aviv: long='Israel Standard Time' short='Israel Standard Time'!
            Brazil/East: long='Brasilia Standard Time' short='Brasilia Standard Time'!
      Chile/Continental: long='Chile Standard Time' short='Chile Standard Time'!
     Chile/EasterIsland: long='Easter Island Standard Time' short='Easter Island Standard Time'!
                   Cuba: long='Cuba Standard Time' short='Cuba Standard Time'!
                   Iran: long='Iran Standard Time' short='Iran Standard Time'!
                 Israel: long='Israel Standard Time' short='Israel Standard Time'!
                  Libya: long='Eastern European Standard Time' short='Eastern European Standard Time'!
           Pacific/Apia: long='Samoa Standard Time' short='Samoa Standard Time'!
         Pacific/Easter: long='Easter Island Standard Time' short='Easter Island Standard Time'!
           Pacific/Fiji: long='Fiji Standard Time' short='Fiji Standard Time'!

It also fixes Pacific/Fakaofo, which was confused between GMT+14:00 and
GMT+13:00.

We need a special case for Pacific/Apia because icu4c 4.9 doesn't believe
Samoa has ever used daylight time.

I've also added a test to keep us out of mischief in the face of future
upgrades to the Olson tzdata and/or icu4c.

Bug: 7955614
Bug: 8026776
Change-Id: I7ed551a691f29e26dd71456d492493d2a4fce945
Don't call GetMethodID with a pending exception.

Why has no-one been hitting this? Because you'd need your first
getaddrinfo(3) failure to be an EAI_SYSTEM kind of failure, and
you'd need CheckJNI on. So only developers could hit this, and
they'd have to be really unlucky. Like the guy sitting next to me.

Change-Id: I6d2808722eaa50a96ebfa92b996803783601e429
icu4c 4.9 can localize "fil".

Bug: 8023288
Change-Id: I40d26622e135c5ab06c90b1744a87bcf8cb320de
Manually update the libcore native code.

Cherry-picking all the individual tiny cleanups from the internal branch was
too hard.

Change-Id: Ib97643d3502295685390854c9edd97c93c4c2ecf
Don't rely on fallback time zone names starting "GMT".

I can't think of a way to say what I actually want to say here, so let's
just wait for icu4c 50 and hope we can rewrite all this code with the new
TimeZoneNames API. Until then, various locales -- those whose gmtFormat
doesn't start "GMT" -- still have the bugs that the previous change fixes
for the majority of locales.

Also switch from "Samoa Summer Time" to "Samoa Daylight Time" because that's
what CLDR is proposing to go with.

Change-Id: I47e2fc413ccde6af59f51e5ec79e664a1dc8be82