Cleaned up indentation in cookie.rb

This file used a mix of tabs and spaces for indentation. This commit changes
this so only spaces are used.
Use SynchronizedArray instead of Object#extend

Using Object#extend can hinder performance due to every call invalidates the
global constant cache. By creating a dedicated class (SynchronizedArray) the
amount of invalidations can be cut in half. Consider the following script:

    require 'httpclient'

    before = RubyVM.stat

    10.times do
      HTTPClient.get('http://httpbin.org/cookies', :follow_redirect => true)
    end

    after   = RubyVM.stat
    padding = before.keys.map { |key| key.to_s.length }.sort.last

    before.each do |key, value|
      diff = after[key] - value

      label      = "#{key}:".ljust(padding + 1, ' ')
      before_val = value.to_s.ljust(4, ' ')
      after_val  = after[key].to_s.ljust(4, ' ')

      puts "#{label} #{before_val} => #{after_val} (+ #{diff})"
    end

When running this using httpclient 2.5.3 the output is as following:

    global_method_state:   138  => 138  (+ 0)
    global_constant_state: 2104 => 2124 (+ 20)
    class_serial:          8860 => 8920 (+ 60)

This results in 20 constant cache invalidations (2 for every HTTPClient#get)
call. If we now run the script using the Git version of httpclient (including
this commit) the output is instead as following:

    global_method_state:   138  => 138  (+ 0)
    global_constant_state: 2106 => 2116 (+ 10)
    class_serial:          8865 => 8895 (+ 30)

Now we're only left with 10 constant cache invalidations.

It's worth mentioning that the above problem is only really apparent when one
creates many HTTPClient instances over time. If one instance were to be created
and then cached the problem would be less severe. Having said that, one
shouldn't have to resort to caching HTTPClient instances just to get the
invalidation amount down.
Merge pull request #227 from YorickPeterse/master

Cut down constant cache invalidations