Threadsafe headers

WIP. Not intended to be merged.

Work with threadsafe version of ActiveResource