Cache Gem::Version instances for each version string

This prevents having numerous instances of the same value object. In
particular, the use of String#scan in Version#segments is a hot spot. We
could perform the caching there but it seems reasonable to cache the
entire object.
Implement Gem::Specification#to_ary

This is a perf fix. Array#flatten is called in places which contain
nested arrays of spec objects. (For example in
Gem::Specification.find_in_unresolved.) Due to Ruby's implementation of
Array#flatten, it will hit method_missing to try to dispatch the #to_ary
method, which is slow. Implementing a #to_ary like this prevents
method_missing getting called.
Fix a test failure on Windows

This patch fixes a test failure on on RubyInstaller CI.
The test requires ruby only on Windows, but ruby is not available if
ruby is not installed. Instead we use Gem.ruby.
https://bugs.ruby-lang.org/issues/8058
Fix defaults string for `gem pristine`
Update history for sniped commit from #577
Warn when an unsigned gem is verified

Part of #474
Warn if an untrusted certificate is seen

This warning and the warning for @042d75c are absolute.  The policy
doesn't no which type of policy it is.  Future versions may add or
remove protections so the warning should happen even if using the "no
security" policy.

Fixes #474
Merge pull request #575 from shirosaki/fix_test

Fix a test failure on Windows
Update history for #575
Convert version to requirement when updating gems

Gem::DependencyInstaller expects a Gem::Requirement but the updated
sends a Gem::Version instead, so convert it.  While #570 describes the
issue and provides a backtrace it does not provide enough information to
reproduce the issue locally.  Perhaps a local version of the gem is
required to trigger the bug?

Fixes #570
No longer fails when found same gem but for another platform

RubyGems found same gem but for other platforms, and failed to
display the proper error message.

Also corrected pluralization of platform(s).

Fixes #576
Order methods in GemcutterUtilities
Document GemcutterUtilities
Ignore an empty RUBYGEMS_HOST environment variable

If RUBYGEMS_HOST was set but empty RubyGems would try to use this
invalid value which lead to user confusion.  Now RubyGems ignores the
invalid value and uses the preconfigured one.

Based on #558

Fixes #558
Handle Psych::SyntaxErrors better. Fixes #571
Merge pull request #447 from jonleighton/perf_tweaks

Perf tweaks