Address use after free between view, resolver and nta.
Hold a weak reference to the view so that it can't go away while nta is performing its lookups. Cancel nta timers once all external references to the view have gone to prevent them triggering new work.
(cherry picked from commit 0b2555e8)
Closes #2067 (closed)