Make the @@constants Hash thread-safe by wrapping it in a Mutex
Make the @@constants Hash thread-safe by wrapping it in a Mutex

When multiple threads are creating instances of
Faraday::RackBuilder::Handler, the `@@constants` hash may exhibit
unexpected behaviour, as the Hash class is not thread-safe in Ruby.

This commit wraps all writes to `@@constants` in a Mutex, thereby
ensuring mutual exclusion.

ru-faraon/Faraday-is-an-HTTP-client,jhass/faraday,mauricionr/faraday,O-I/faraday,iamjarvo/faraday,jrafanie/faraday,ekampp/faraday,daviswahl/faraday,hrysd/faraday,stayhero/faraday,flower-pot/faraday,nevans/faraday,jrafanie/faraday,petems/faraday,pvdb/faraday,customink/faraday,spyofchina/faraday,ngpestelos/faraday,davidcornu/faraday,mauricionr/faraday,davoclavo/faraday,coinbase/faraday,hstrowd/faraday,flower-pot/faraday,stayhero/faraday,ekampp/faraday,customink/faraday,iamjarvo/faraday,santiagodoldan/faraday,lostisland/faraday,O-I/faraday,lostisland/faraday,hstrowd/faraday,ngpestelos/faraday,pvdb/faraday,AvaelKross/faraday,mehulkar/faraday,jhass/faraday,hrysd/faraday,mehulkar/faraday,davoclavo/faraday,engineyard/faraday,santiagodoldan/faraday,luvtechno/faraday,engineyard/faraday,AvaelKross/faraday,zhaoxl/faraday,apepper/faraday,nevans/faraday,apepper/faraday,spyofchina/faraday,davidcornu/faraday,prcongithub/faraday,zanker/faraday,coinbase/faraday,daviswahl/faraday,zhaoxl/faraday,petems/faraday,grosser/faraday,luvtechno/faraday,grosser/faraday,prcongithub/faraday,zanker/faraday,ru-faraon/Faraday-is-an-HTTP-client