Use the memory buffer for collecting header and body data
Use the memory buffer for collecting header and body data

The memory buffer is safe to use in "thread blocking regions". It does not
call back into Ruby methods that are unsafe - that is, those to do not
reacquire the global interpreter lock.

This commit also sets the CURL_NOSIGNAL flag on the session. This prevents
Curl from calling signal handlers when processing timeout code. Ruby captures
signals, and hence, the Curl code could accidentally call bakc into the Ruby
interpreter from within a "thread blocking region". This will cause
segmentation faults and other oddities.

toland/patron,inkel/patron,toland/patron,inkel/patron