Improvement to patching of newrelic application. Introduce a threading.local in newrelic.application. This is needed to prevent our current thread to lock itself in extremely rare cases (did I mention Heissenbug?).  See docs/deadlock_trace.txt for an example trace. Also improved outputfilters for another rare error when there's no browser_timing_footer