Allows tests to use a random (but controlled) port number instead of a
hardcoded one. This helps CI tools when running parallels builds on the
same builder slave.
# File lib/rubygems/test_case.rb, line 1203
def self.process_based_port
@@process_based_port ||= 8000 + $$ % 1000
end