Optimize DefaultHostnameVerifier.
The only behavior change should be a bug fix. There was a heck
"cn.lastIndexOf('.') >= 0" that was always true. This has been
fixed to match the comment "require two dots".
Don't call getDNSSubjectAlts unless necessary.
Errors were created and then dropped. Now they're not created.
strictWithSubDomains was supported but unused. Now it isn't supported.
IP address parsing is now left up to the experts (InetAddress).
No more unnecessary conversions to arrays.
Before & After performance saves ~40% for google.com, which was the
only host that took more than 150 microseconds to verify:
host run us linear runtime %
www.amazon.com baseline 92.6 = 4%
www.amazon.com optimized 26.7 1%
www.google.com baseline 2,457.0 ============================== 100%
www.google.com optimized 1,421.2 ================= 58%
www.ubs.com baseline 143.2 = 6%
www.ubs.com optimized 24.4 1%
Change-Id: I42782bec6a86b95e8fa089aa6edeca45110c2fc4
http://b/2811070