threadsafe headers

Make headers persistent to current thread so they can be set on a per-request basis instead of globally.